-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.production.yml
59 lines (54 loc) · 1.79 KB
/
docker-compose.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
# Docker-compose configuration for production
version: '2'
services:
django:
build:
context: .
dockerfile: Dockerfile-django.production
container_name: parrot_mania_django
restart: unless-stopped
volumes:
- "/var/lib/docker-nginx/files/parrot_mania/assets:/files/assets"
- "/var/log/parrot_mania:/var/log/parrot_mania"
# For some reason the command also has to be specified here, otherwise the entrypoint+command combination won't
# work.
entrypoint: /usr/bin/wait-for-it.sh postgres:5432 -t 60 --
command: gunicorn parrot_mania.wsgi:application --workers 2 --bind :80
networks:
- default
- parrot_mania_nginx
- parrot_mania_postgres
depends_on:
- redis
external_links:
- postgres-10:postgres
node:
build:
context: .
dockerfile: Dockerfile-node.production
container_name: parrot_mania_node
restart: unless-stopped
command: yarn start
volumes:
- "/var/lib/docker-nginx/files/parrot_mania/app/assets:/files/assets"
- "/var/log/parrot_mania:/var/log/parrot_mania"
networks:
- default
- parrot_mania_nginx
redis:
image: redis:4.0.10-alpine
restart: unless-stopped
volumes:
- "/var/lib/docker-parrot_mania/redis:/data"
networks:
- default
# NB: These networks must be created by fabfile and contain the global nginx/postgres containers.
# Keep it in sync with fabfile!
networks:
default:
external:
name: parrot_mania_default
parrot_mania_nginx:
external: true
parrot_mania_postgres:
external: true