-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.prod.yml
59 lines (50 loc) · 1.55 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
version: "3"
services:
react-app:
build: ./Frontend
volumes:
- ./Frontend:/app
- build_folder:/app/build
- ./Frontend/node_modules/:/app/node_modules
stdin_open: true
tty: true
environment:
- CHOKIDAR_USEPOLLING=true
flask-app:
build: ./Backend
ports:
- "5000:5000"
restart: always
volumes:
- ./Backend:/app
env_file:
- ./settings/prod/.env.prod
command: gunicorn -w 4 --bind 0.0.0.0:5000 --timeout=6000 --log-level=debug run:app
nginx:
build: ./nginx
container_name: nginx
ports:
- "80:80"
- "443:443"
restart: "on-failure"
volumes:
# - ./nginx/nginx.conf:/etc/nginx/conf.d
- build_folder:/var/www/Frontend
- ./certbot/conf:/etc/letsencrypt
- ./certbot/www:/var/www/certbot
command : "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
depends_on:
- flask-app
- react-app
certbot:
image: certbot/certbot
restart: unless-stopped
container_name: certbot
volumes:
- ./certbot/conf:/etc/letsencrypt
- ./certbot/www:/var/www/certbot
depends_on:
- nginx
entrypoint : "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
volumes:
build_folder: