-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
50 lines (48 loc) · 1.22 KB
/
docker-compose.yml
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
services:
modelgen:
image: edence/sqlalchemy-omopcdm-modelgen:1
environment:
DB_HOST: cdmdb
DB_USER: ${TARGET_DB_USER}
DB_PASSWORD: ${TARGET_DB_PASSWORD}
DB_NAME: ${TARGET_DB_NAME}
OUTPUT_FILE: "/output/omopcdm54.py"
OPTIONS: "nobidi"
GENERATOR: "declarative"
depends_on:
cdmdb:
condition: service_healthy
restart: no
volumes:
- "./src/sqlalchemy_omopcdm:/output:rw"
# https://hub.docker.com/_/postgres
cdmdb:
image: postgres:14-alpine
environment:
POSTGRES_USER: ${TARGET_DB_USER}
POSTGRES_PASSWORD: ${TARGET_DB_PASSWORD}
POSTGRES_DB: ${TARGET_DB_NAME}
PGDATA: "/pgdata"
# the following values are libpq envvars which make it easier to exec psql
# and the other tools
PGDATABASE: ${TARGET_DB_NAME}
PGUSER: ${TARGET_DB_USER}
PGPASSWORD: ${TARGET_DB_PASSWORD}
volumes:
- "targetdb:/pgdata:rw"
healthcheck:
interval: 10s
retries: 10
test:
- CMD
- /usr/local/bin/pg_isready
timeout: 3s
command:
- -c
- shared_buffers=256MB
- -c
- max_connections=200
restart: unless-stopped
shm_size: 2gb
volumes:
targetdb: