-
Notifications
You must be signed in to change notification settings - Fork 24
/
docker-compose.yaml
155 lines (141 loc) · 4.35 KB
/
docker-compose.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
# Defines services that shared across multiple apps, such as Redis and our databases
# Run via `docker-compose up`
version: "3"
services:
case_triage_migrations:
image: us-docker.pkg.dev/recidiviz-staging/appengine/default:latest
volumes:
- "./recidiviz:/app/recidiviz/"
depends_on:
- case_triage_db
command: pipenv run alembic -c recidiviz/persistence/database/migrations/case_triage_alembic.ini upgrade head
environment:
- SQLALCHEMY_DB_HOST=case_triage_db
- SQLALCHEMY_DB_NAME=postgres
- SQLALCHEMY_USE_SSL=0
- SQLALCHEMY_DB_USER=case_triage_user
- SQLALCHEMY_DB_PASSWORD=example
case_triage_db:
image: postgres:13.1-alpine
environment:
POSTGRES_USER: case_triage_user
POSTGRES_PASSWORD: example
POSTGRES_DB: postgres
ports:
- "5433:5432"
volumes:
- case_triage_db_data:/var/lib/postgresql/data
- case_triage_db_socket:/var/run/postgresql/
justice_counts_db:
image: postgres:13.1-alpine
environment:
POSTGRES_USER: justice_counts_user
POSTGRES_PASSWORD: example
POSTGRES_DB: postgres
ports:
- "5434:5432"
volumes:
- justice_counts_db_data:/var/lib/postgresql/data
- justice_counts_db_socket:/var/run/postgresql/
justice_counts_migrations:
image: us-docker.pkg.dev/recidiviz-staging/appengine/default:latest
volumes:
- "./recidiviz:/app/recidiviz/"
depends_on:
- justice_counts_db
command: pipenv run alembic -c recidiviz/persistence/database/migrations/justice_counts_alembic.ini upgrade head
environment:
- SQLALCHEMY_DB_HOST=justice_counts_db
- SQLALCHEMY_DB_NAME=postgres
- SQLALCHEMY_USE_SSL=0
- SQLALCHEMY_DB_USER=justice_counts_user
- SQLALCHEMY_DB_PASSWORD=example
operations_db:
image: postgres:13.1-alpine
environment:
POSTGRES_USER: operations_user
POSTGRES_PASSWORD: example
POSTGRES_DB: postgres
ports:
- "5435:5432"
volumes:
- operations_db_data:/var/lib/postgresql/data
- operations_db_socket:/var/run/postgresql/
operations_migrations:
image: us-docker.pkg.dev/recidiviz-staging/appengine/default:latest
volumes:
- "./recidiviz:/app/recidiviz/"
depends_on:
- operations_db
command: pipenv run alembic -c recidiviz/persistence/database/migrations/operations_alembic.ini upgrade head
environment:
- SQLALCHEMY_DB_HOST=operations_db
- SQLALCHEMY_DB_NAME=postgres
- SQLALCHEMY_USE_SSL=0
- SQLALCHEMY_DB_USER=operations_user
- SQLALCHEMY_DB_PASSWORD=example
pathways_db:
image: postgres:13.1-alpine
environment:
POSTGRES_USER: pathways_user
POSTGRES_PASSWORD: example
ports:
- "5432:5432"
volumes:
- pathways_db_data:/var/lib/postgresql/data
- pathways_db_socket:/var/run/postgresql/
workflows_db:
image: postgres:13.1-alpine
environment:
POSTGRES_USER: workflows_user
POSTGRES_PASSWORD: example
ports:
- "5437:5432"
volumes:
- workflows_db_data:/var/lib/postgresql/data
- workflows_db_socket:/var/run/postgresql/
redis:
image: redis:5.0
ports:
- "6379:6379"
insights_migrations:
image: us-docker.pkg.dev/recidiviz-staging/appengine/default:latest
volumes:
- "./recidiviz:/app/recidiviz/"
depends_on:
- insights_db
command: pipenv run python -m recidiviz.tools.migrations.run_migrations_docker --database INSIGHTS
environment:
- IS_DEV=true
workflows_migrations:
image: us-docker.pkg.dev/recidiviz-staging/appengine/default:latest
volumes:
- "./recidiviz:/app/recidiviz/"
depends_on:
- workflows_db
command: pipenv run python -m recidiviz.tools.migrations.run_migrations_docker --database WORKFLOWS
environment:
- IS_DEV=true
insights_db:
image: postgres:13.1-alpine
environment:
POSTGRES_USER: insights_user
POSTGRES_PASSWORD: example
ports:
- "5438:5432"
volumes:
- insights_db_data:/var/lib/postgresql/data
- insights_db_socket:/var/run/postgresql/
volumes:
case_triage_db_data:
case_triage_db_socket:
justice_counts_db_data:
justice_counts_db_socket:
operations_db_data:
operations_db_socket:
pathways_db_data:
pathways_db_socket:
workflows_db_data:
workflows_db_socket:
insights_db_data:
insights_db_socket: