-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathdocker-compose.justice-counts.yaml
27 lines (25 loc) · 1.23 KB
/
docker-compose.justice-counts.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Defines services needed to run the Justice Counts Control Panel app (on top of shared services already in docker-compose.yaml)
# Run via `docker-compose -f docker-compose.yaml -f docker-compose.justice-counts.yaml up`
version: "3"
services:
control_panel_backend:
image: us-central1-docker.pkg.dev/justice-counts-staging/publisher-and-dashboard-images/main:latest
volumes:
- "./recidiviz:/app/recidiviz/"
- "~/.config:/home/recidiviz/.config" # use user's credentials to access GCP APIs
- justice_counts_db_socket:/cloudsql/justice_counts
depends_on:
- justice_counts_db
ports:
- "5001:5000"
- "5678:5678"
# Running with threads and no debugger seems to improve latency on first request
command: pipenv run flask run -h 0.0.0.0 --with-threads --no-debugger
environment:
- FLASK_APP=/app/recidiviz/justice_counts/control_panel/server.py
- FLASK_ENV=development
- GOOGLE_CLOUD_PROJECT=recidiviz-staging
# The virtual env files are packaged with the image so they do not change during the lifecycle of the container
# They can safely be excluded from the stat reloader for a performance boost
- FLASK_RUN_EXCLUDE_PATTERNS=/app/.venv/**/*
- IS_DEV=true