-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
65 lines (58 loc) · 1.71 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
version: '3'
services:
api:
image: ${API_IMAGE}
container_name: prosimos-api
restart: unless-stopped
ports:
- 5000:5000
volumes:
- ./data/celery:/app/src/celery/data
environment:
- CELERY_BROKER_URL=amqp://rabbit:5672/
- CELERY_RESULT_BACKEND=redis://redis:6379/
client:
image: ${CLIENT_IMAGE}
container_name: prosimos-client
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./certbot/conf:/etc/letsencrypt:ro
- ./certbot/www:/var/www/certbot:ro
depends_on:
- api
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
certbot:
image: certbot/certbot
container_name: certbot
restart: unless-stopped
volumes:
- ./certbot/conf:/etc/letsencrypt:rw
- ./certbot/www:/var/www/certbot:rw
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
# broker for celery
rabbit:
hostname: rabbit
image: rabbitmq:3-management
container_name: prosimos-rabbitmq
ports:
- 5672:5672 # port for the worker for tasks management
- 15672:15672 # GUI port
# result backend for celery
redis:
image: redis:6-alpine
ports:
- 6379:6379
# worker deployment
worker:
image: ${CELERY_IMAGE}
environment:
- CELERY_BROKER_URL=amqp://rabbit:5672/
- CELERY_RESULT_BACKEND=redis://redis:6379/
volumes:
- ./data/celery:/app/src/celery/data
depends_on:
- rabbit
- redis