-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
198 lines (187 loc) · 6.68 KB
/
Copy pathdocker-compose.yml
File metadata and controls
198 lines (187 loc) · 6.68 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
services:
nginx:
image: nginx:alpine
container_name: dq-nginx
restart: unless-stopped
ports:
- "${NGINX_PORT:-80}:80"
volumes:
- ./nginx/conf.d:/etc/nginx/conf.d:ro
depends_on:
- app
- pgadmin
- superset
- piqi
- fhir
postgres:
image: postgres:16
container_name: dq-postgres
restart: unless-stopped
ports:
- "${POSTGRES_PORT:-5432}:5432"
environment:
POSTGRES_DB: postgres
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- ./postgres/init:/docker-entrypoint-initdb.d
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d postgres" ]
interval: 5s
timeout: 5s
retries: 5
postgrest:
image: postgrest/postgrest:v12.2.0
container_name: postgrest
depends_on:
postgres:
condition: service_started
liquibase-dq:
condition: service_completed_successfully
environment:
PGRST_DB_URI: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/dq
PGRST_DB_SCHEMA: ${PGRST_DB_SCHEMA}
PGRST_DB_ANON_ROLE: ${PGRST_DB_ANON_ROLE}
PGRST_SERVER_PORT: ${PGRST_SERVER_PORT}
PGRST_SERVER_CORS_ALLOWED_ORIGINS: ${APP_BASE_URL}
PGRST_SERVER_PROXY_URI: ${APP_BASE_URL}/postgrest
pgadmin:
image: dpage/pgadmin4:8
container_name: dq-pgadmin
restart: unless-stopped
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD}
PGADMIN_CONFIG_SERVER_MODE: "True"
PGADMIN_CONFIG_ENHANCED_COOKIE_PROTECTION: "False"
PGADMIN_CONFIG_CONSOLE_LOG_LEVEL: "10"
SCRIPT_NAME: /pgadmin
depends_on:
- postgres
volumes:
- pgadmin_data:/var/lib/pgadmin
liquibase-dq:
image: liquibase/liquibase:4.25.0-alpine
container_name: dq-liquibase-dq # Changed container name
depends_on:
postgres:
condition: service_healthy
volumes:
- ./liquibase/db/changelog:/liquibase/changelog:ro
command:
[
"--url=jdbc:postgresql://postgres:5432/dq", # This should point to your data_quality DB
"--username=${POSTGRES_USER}",
"--password=${POSTGRES_PASSWORD}",
"--changeLogFile=/changelog/db.changelog-master.yaml",
"update"
]
# ADD this NEW service to manage the fhir database
liquibase-fhir:
image: liquibase/liquibase:4.25.0-alpine
container_name: dq-liquibase-fhir # New container name
environment:
- JAVA_OPTS=-DPOSTGRES_USER=${POSTGRES_USER}
depends_on:
postgres:
condition: service_healthy
volumes:
- ./liquibase/db/changelog:/liquibase/changelog:ro
command:
[
"--url=jdbc:postgresql://postgres:5432/fhir", # Points to the FHIR database
"--username=${POSTGRES_USER}",
"--password=${POSTGRES_PASSWORD}",
"--changeLogFile=/changelog/db.changelog-fhir.yaml", # Uses a NEW master file
"update"
]
superset:
build:
context: .
dockerfile: Dockerfile.superset
container_name: dq-superset
restart: unless-stopped
ports:
- "8088:8088"
environment:
SUPERSET_SECRET_KEY: ${SUPERSET_SECRET_KEY}
SQLALCHEMY_DATABASE_URI: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
depends_on:
postgres:
condition: service_healthy
superset-init:
condition: service_completed_successfully
volumes:
- superset_home:/app/superset_home
superset-init:
build:
context: .
dockerfile: Dockerfile.superset
container_name: dq-superset-init
environment:
SUPERSET_SECRET_KEY: ${SUPERSET_SECRET_KEY}
SQLALCHEMY_DATABASE_URI: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
SUPERSET_ADMIN_USERNAME: ${SUPERSET_ADMIN_USERNAME}
SUPERSET_ADMIN_PASSWORD: ${SUPERSET_ADMIN_PASSWORD}
SUPERSET_ADMIN_EMAIL: ${SUPERSET_ADMIN_EMAIL}
depends_on:
postgres:
condition: service_healthy
command: >
bash -c "
superset db upgrade &&
superset init &&
superset fab create-admin --username $${SUPERSET_ADMIN_USERNAME} --firstname Admin --lastname User --email $${SUPERSET_ADMIN_EMAIL} --password $${SUPERSET_ADMIN_PASSWORD} || true
"
restart: "no"
volumes:
- superset_home:/app/superset_home
piqi:
build:
context: ./reference_application
dockerfile: Dockerfile
container_name: piqi-engine
restart: unless-stopped
environment:
- ASPNETCORE_ENVIRONMENT=${PIQI_ENVIRONMENT_NAME}
- ASPNETCORE_HTTP_PORTS=${PIQI_ENGINE_PORT}
depends_on:
- postgres
app:
image: nginx:alpine
container_name: dq-app
restart: unless-stopped
volumes:
# Mount UI files directly
- ./app:/usr/share/nginx/html
# Mount DuckDB SQL directly
- ./duckdb:/usr/share/nginx/html/duckdb:ro
depends_on:
- piqi
fhir:
image: hapiproject/hapi:latest
container_name: hapi-fhir
ports:
- "8181:8080"
# REMOVE all the HAPI_FHIR_... environment variables
environment:
- JAVA_OPTS=-Xms4g -Xmx16g
- CATALINA_OPTS=-Xms4g -Xmx16g
- JAVA_PROPERTIES=-Xms4g -Xmx16g
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
volumes:
# Mount the new config file (READ-ONLY)
- ./hapi-fhir-config/application.properties:/app/config/application.properties:ro
depends_on:
postgres:
condition: service_healthy
# Make fhir wait for its database to be ready
liquibase-fhir:
condition: service_completed_successfully
restart: unless-stopped
volumes:
postgres_data:
pgadmin_data:
superset_home: