-
Notifications
You must be signed in to change notification settings - Fork 0
/
production.yml
99 lines (98 loc) · 2.28 KB
/
production.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
version: '3'
services:
web:
container_name: nginx
env_file: .env
environment:
- EX_PORT_NGINX=$EX_PORT_NGINX
- PORT_NGINX=$PORT_NGINX
image: nginx:alpine
restart: always
ports:
- "$EX_PORT_NGINX:$PORT_NGINX"
volumes:
- ./logs:/log
- ./nginx/site.conf:/etc/nginx/conf.d/default.conf
- /etc/localtime:/etc/localtime:ro
links:
- app
logging:
driver: "json-file"
options:
max-size: "5m"
max-file: "10"
app:
container_name: flask-app
env_file: .env
build:
context: .
dockerfile: ./compose/production/Dockerfile
restart: always
command: gunicorn wsgi:app -b 0.0.0.0:8011 --log-level=info
volumes:
- ./src:/home/app/web/
- ./logs:/home/app/web/logs
- /etc/localtime:/etc/localtime:ro
links:
- redis
logging:
driver: "json-file"
options:
max-size: "5m"
max-file: "10"
worker:
container_name: worker1
env_file: .env
build:
context: .
dockerfile: ./compose/production/Dockerfile
restart: always
command: celery -A app.task worker --loglevel=info -f logs/beat.log
volumes:
- ./src:/home/app/web/
- ./logs:/home/app/web/logs
- /etc/localtime:/etc/localtime:ro
links:
- redis
logging:
driver: "json-file"
options:
max-size: "5m"
max-file: "10"
beat:
container_name: beat1
env_file: .env
build:
context: .
dockerfile: ./compose/production/Dockerfile
restart: always
command: celery -A app.task beat --loglevel=info
volumes:
- ./src:/home/app/web/
- ./logs:/home/app/web/logs
- /etc/localtime:/etc/localtime:ro
links:
- redis
flower:
container_name: flower
env_file: .env
environment:
- FLOWER_EXPOSE=$FLOWER_EXPOSE
- CELERY_BROKER_URL=$CELERY_BROKER_URL
build:
context: .
dockerfile: ./compose/production/Dockerfile
volumes:
- ./src:/home/app/web/
entrypoint: flower
command: -A app.task --port=5555 --broker=${CELERY_BROKER_URL}
ports:
- "$FLOWER_EXPOSE:5555"
depends_on:
- redis
redis:
container_name: redis_ox
image: redis
volumes:
- ./data/redis:/data
restart: always