-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdocker-compose.yml
112 lines (97 loc) · 2.19 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
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
version: '3.3'
services:
api:
build:
context: ./api
dockerfile: Dockerfile
container_name: api
image: api
restart: unless-stopped
env_file:
- server.env
ports:
- 5000
environment:
- FLASK_ENV=production
- APP_SETTINGS=project.config.ProductionConfig
depends_on:
- mongodb
- redis
volumes:
- ./data/uploads:/usr/src/app/uploads
privileged: true
mongodb:
image: mongo:latest
container_name: mongodb
ports:
- 27017
volumes:
- ./db-data:/data/db
nginx:
build:
context: ./nginx
dockerfile: Dockerfile
container_name: nginx
ports:
- 80:80
- 443:443
restart: unless-stopped
depends_on:
- api
volumes:
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
worker:
image: api
command: rq worker default --url redis://redis:6379 --with-scheduler
env_file:
- server.env
volumes:
- ./data/uploads:/usr/src/app/uploads
depends_on:
- redis
- api
privileged: true
worker2:
image: api
command: rq worker default --url redis://redis:6379
env_file:
- server.env
volumes:
- ./data/uploads:/usr/src/app/uploads
depends_on:
- redis
- api
privileged: true
worker3:
image: api
command: rq worker default image statistics --url redis://redis:6379
env_file:
- server.env
volumes:
- ./data/uploads:/usr/src/app/uploads
depends_on:
- redis
- api
privileged: true
rq-dashboard:
build:
context: ./rq-dashboard
dockerfile: Dockerfile
ports:
- "9181:9181"
environment:
- RQ_DASHBOARD_REDIS_URL=redis://redis:6379
depends_on:
- redis
redis:
image: redis:6.2-alpine
certbot:
image: certbot/certbot
volumes:
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
volumes:
db-data: