-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
62 lines (60 loc) · 1.34 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
version: "3"
services:
pg:
image: postgres:14.0-alpine
container_name: db
command: >
postgres -c max_wal_size=20GB
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
logging:
options:
max-size: 10m
max-file: "3"
ports:
- "5432:5432"
volumes:
- db-data:/var/lib/postgresql/data/
healthcheck:
test: ["CMD", "pg_isready", "-q", "-d", "${POSTGRES_DB}", "-U", "${POSTGRES_USER}"]
interval: 10s
timeout: 3s
retries: 3
deploy:
resources:
limits:
memory: 4096m # 6Gi limit, change if needed
mimic_import:
container_name: mimic_import
build:
dockerfile: ./mimic_import.dockerfile
context: .
image: mimic_import
environment:
- DB_USER=${POSTGRES_USER}
- DB_PASSWORD=${POSTGRES_PASSWORD}
- PYTHONUNBUFFERED=1
depends_on:
pg:
condition: service_healthy
links:
- pg
volumes:
- ${MIMIC_DATA_PATH}:/usr/src/app/data
- ./config.json:/usr/src/app/config.json
deploy:
resources:
limits:
memory: 1024m # 6Gi limit, change if needed
# Local Storage
volumes:
db-data:
## NFS
# volumes:
# db-data:
# driver: local
# driver_opts:
# type: 'none'
# o: 'bind'
# device: ${NFS_MOUNT}