-
Notifications
You must be signed in to change notification settings - Fork 32
/
docker-compose.prod.yml
53 lines (49 loc) · 1.15 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
flaskapp:
build: ./
working_dir: /var/www/app
command: bash -c "supervisord -c /etc/supervisord.conf"
volumes:
- ./app:/var/www/app:rw
- ./app/log:/var/www/app/log:rw
- ./supervisor/supervisord.conf:/etc/supervisord.conf:ro
- ./supervisor/conf.d:/etc/supervisor/conf.d:ro
links:
- postgresql
- rabbitmq
- redis
environment:
- APP_ENVIRONMENT=PRODUCTION
- FLASK_SETTINGS=settings/prod.py
postgresql:
restart: always
image: postgres:latest
env_file: postgresql/.env
volumes:
- ./dockerfiles/pgdata:/var/lib/postgresql/data/pgdata:rw
ports:
- "5432"
rabbitmq:
restart: always
image: rabbitmq:latest
env_file: rabbitmq/.env
ports:
- "5672"
redis:
restart: always
image: redis:latest
env_file: redis/.env
volumes:
- ./redis/redis.conf:/data/redis.conf:ro
command: redis-server /data/redis.conf
ports:
- "6379"
nginx:
restart: always
image: nginx:latest
env_file: nginx/.env
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx/flask_app.conf:/etc/nginx/sites-enabled/flask_app.conf:ro
- ./app/run/uwsgi:/var/run/uwsgi:ro
ports:
- "80:80"