forked from Birdiary/webserver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
84 lines (71 loc) · 1.61 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
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
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 --url redis://redis:6379
env_file:
- server.env
volumes:
- ./data/uploads:/usr/src/app/uploads
depends_on:
- redis
- api
rq-dashboard:
image: eoranged/rq-dashboard
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: