/
docker-compose.case-triage.yaml
39 lines (36 loc) · 1.53 KB
/
docker-compose.case-triage.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
28
29
30
31
32
33
34
35
36
37
38
39
# Defines services needed to run the Case Triage app (on top of shared services already in docker-compose.yaml)
# Run via `docker-compose -f docker-compose.yaml -f docker-compose.case-triage.yaml up`
version: "3"
services:
case_triage_backend:
image: us.gcr.io/recidiviz-staging/appengine/default:latest
volumes:
- "./recidiviz:/app/recidiviz/"
- "~/.config:/root/.config" # use user's credentials to access GCP APIs
- case_triage_db_socket:/cloudsql/case_triage
- pathways_db_socket:/cloudsql/pathways
- outliers_db_socket:/cloudsql/outliers
- workflows_db_socket:/cloudsql/workflows
depends_on:
- case_triage_db
- pathways_db
- outliers_db
- workflows_db
ports:
- "5000:5000"
# 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:
- AUTH0_CLAIM_NAMESPACE=https://dashboard.recidiviz.org
- FLASK_APP=/app/recidiviz/case_triage/server.py
- FLASK_ENV=development
# 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/**/*
- GOOGLE_CLOUD_PROJECT=recidiviz-staging
- IS_DEV=true
- SEGMENT_WRITE_KEY=dev-key-wont-send-data
links:
- "redis:rate_limit_cache"
- "redis:sessions_cache"
- "redis:pathways_metric_cache"