-
Notifications
You must be signed in to change notification settings - Fork 24
/
docker-compose.admin-panel.yaml
69 lines (65 loc) · 2.55 KB
/
docker-compose.admin-panel.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Defines services needed to run the Admin Panel app (on top of shared services already in docker-compose.yaml)
# Run via `docker-compose -f docker-compose.yaml -f docker-compose.admin-panel.yaml up`
version: "3"
services:
admin_panel_backend:
image: us-docker.pkg.dev/recidiviz-staging/appengine/default:latest
volumes:
- "./recidiviz:/app/recidiviz/"
- "~/.config:/root/.config"
- case_triage_db_socket:/cloudsql/case_triage
- justice_counts_db_socket:/cloudsql/justice_counts
- operations_db_socket:/cloudsql/operations
- workflows_db_socket:/cloudsql/workflows
- insights_db_socket:/cloudsql/insights
depends_on:
- case_triage_db
- justice_counts_db
- operations_db
- workflows_db
- insights_db
- redis
ports:
- "5050:5000"
command: pipenv run flask run -h 0.0.0.0
environment:
- FLASK_APP=/app/recidiviz/admin_panel/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
- ASSET_GENERATION_URL=http://asset-generation-service:5174
admin_panel_cache_hydration:
image: us-docker.pkg.dev/recidiviz-staging/appengine/default:latest
volumes:
- "./recidiviz:/app/recidiviz/"
- "~/.config:/root/.config"
- case_triage_db_socket:/cloudsql/case_triage
- justice_counts_db_socket:/cloudsql/justice_counts
- operations_db_socket:/cloudsql/operations
- insights_db_socket:/cloudsql/insights
depends_on:
- case_triage_db
- justice_counts_db
- operations_db
- insights_db
- redis
# Allow backend to boot prior to cache hydration which takes some time
- admin_panel_backend
command: pipenv run python -m recidiviz.admin_panel.entrypoints.hydrate_cache
environment:
- IS_DEV=true
- GOOGLE_CLOUD_PROJECT=recidiviz-staging
asset_generation:
container_name: asset-generation-service
image: us-docker.pkg.dev/recidiviz-staging/asset-generation/default:latest
# to avoid clobbering the local node environment, we do not mount the entire package directory
volumes:
- "./nodejs/asset-generation/local:/app/local"
- "./nodejs/asset-generation/src:/app/src"
ports:
- "5174:5174"
command: yarn dev