-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.prod.yml
105 lines (105 loc) · 2.72 KB
/
docker-compose.prod.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
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
services:
nginx:
image: nginx:alpine
container_name: nginx_lb
ports:
- "80:80"
volumes:
- ./deployment/nginx.conf:/etc/nginx/nginx.conf:ro
networks:
- coconut
depends_on:
- app
app:
image: nfdi4chem/coconut:latest
env_file:
- .env
deploy:
replicas: 2
update_config:
parallelism: 1
delay: 10s
restart_policy:
condition: on-failure
networks:
- coconut
depends_on:
- pgsql
- redis
- cm
worker:
image: nfdi4chem/coconut:latest
env_file:
- .env
networks:
- coconut
depends_on:
- app
- pgsql
- redis
- cm
environment:
WITH_SCHEDULER: true
WITH_HORIZON: true
pgsql:
image: "informaticsmatters/rdkit-cartridge-debian:latest"
ports:
- '${FORWARD_DB_PORT:-5432}:5432'
environment:
PGPASSWORD: '${DB_PASSWORD:-secret}'
POSTGRES_DB: '${DB_DATABASE}'
POSTGRES_USER: '${DB_USERNAME}'
POSTGRES_PASSWORD: '${DB_PASSWORD:-secret}'
volumes:
- 'coconut-pgsql:/var/lib/postgresql/data'
- './docker/pgsql/create-testing-database.sql:/docker-entrypoint-initdb.d/10-create-testing-database.sql'
networks:
- coconut
healthcheck:
test:
- CMD
- pg_isready
- '-q'
- '-d'
- '${DB_DATABASE}'
- '-U'
- '${DB_USERNAME}'
retries: 3
timeout: 5s
redis:
image: 'redis:alpine'
ports:
- '${FORWARD_REDIS_PORT:-6379}:6379'
volumes:
- 'coconut-redis:/data'
networks:
- coconut
healthcheck:
test:
- CMD
- redis-cli
- ping
retries: 3
timeout: 5s
cm:
image: "nfdi4chem/cheminformatics-microservice:latest-lite"
environment:
HOMEPAGE_URL: "https://docs.api.naturalproducts.net"
ports:
- '${API_PORT:-8001}:80'
healthcheck:
test: ["CMD", "curl", "-f", "http://cm:80/latest/chem/health"]
interval: 1m30s
timeout: 10s
retries: 20
start_period: 60s
networks:
- coconut
networks:
coconut:
driver: bridge
volumes:
coconut-pgsql:
driver: local
coconut-redis:
driver: local