-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
198 lines (182 loc) · 5.65 KB
/
docker-compose.yaml
File metadata and controls
198 lines (182 loc) · 5.65 KB
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
# Defines services that shared across multiple apps, such as Redis and our databases
# Run via `docker-compose up`
services:
case_triage_migrations:
image: us-docker.pkg.dev/recidiviz-staging/appengine/default:latest
volumes:
- "./recidiviz:/app/recidiviz/"
depends_on:
- case_triage_db
command: uv 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: uv 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:
- "5445: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: uv 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: uv 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: uv 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/
public_pathways_db:
image: postgres:13.1-alpine
environment:
POSTGRES_USER: public_pathways_user
POSTGRES_PASSWORD: example
ports:
- "5439:5432"
volumes:
- public_pathways_db_data:/var/lib/postgresql/data
- public_pathways_db_socket:/var/run/postgresql/
public_pathways_migrations:
image: us-docker.pkg.dev/recidiviz-staging/appengine/default:latest
volumes:
- "./recidiviz:/app/recidiviz/"
depends_on:
- public_pathways_db
command: uv run python -m recidiviz.tools.migrations.run_migrations_docker --database PUBLIC_PATHWAYS
environment:
- IS_DEV=true
persistence_db:
image: postgres:13.1-alpine
environment:
POSTGRES_USER: persistence_user
POSTGRES_PASSWORD: example
ports:
- "5440:5432"
volumes:
- persistence_db_data:/var/lib/postgresql/data
- persistence_db_socket:/var/run/postgresql/
persistence_migrations:
image: us-docker.pkg.dev/recidiviz-staging/appengine/default:latest
volumes:
- "./recidiviz:/app/recidiviz/"
depends_on:
- persistence_db
command: uv run python -m recidiviz.tools.migrations.run_migrations_docker --database PERSISTENCE
environment:
- IS_DEV=true
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:
public_pathways_db_data:
public_pathways_db_socket:
persistence_db_data:
persistence_db_socket: