-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
86 lines (80 loc) · 1.68 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
85
86
version: '2'
services:
redis:
container_name: stage34-redis
image: redis
networks:
- backend
stage34-volume:
container_name: stage34-volume
image: ubuntu:trusty
command: ["/bin/true"]
volumes:
- ./nginx/conf.d:/etc/nginx/conf.d
- ./nginx/mime.types:/etc/nginx/mime.types
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./webapp/assets:/usr/stage34/assets
- ./webapp:/usr/stage34/webapp
- ./data/db:/usr/stage34/db
- ./data/repo:/usr/stage34/repo
- ./frontend/dist:/usr/stage34/frontend
webapp:
container_name: stage34-webapp
build:
context: ./webapp
dockerfile: Dockerfile
networks:
- backend
volumes_from:
- stage34-volume
links:
- redis:redis
environment:
- ENV=prod
command:
- "manage.py"
- "runserver"
- "0.0.0.0:8000"
restart: unless-stopped
worker:
container_name: stage34-worker
build:
context: ./webapp
dockerfile: Dockerfile
networks:
- backend
volumes:
- /var/run/docker.sock:/var/run/docker.sock
volumes_from:
- stage34-volume
links:
- redis:redis
environment:
- ENV=prod
command:
- "celeryworker.py"
- "worker"
- "-l"
- "debug"
- "-Q"
- "q_default"
restart: unless-stopped
nginx:
container_name: stage34-nginx
build:
context: ./nginx
dockerfile: Dockerfile
networks:
- backend
ports:
- '8000:80'
volumes_from:
- stage34-volume
links:
- webapp:webapp
environment:
- ENV=prod
restart: unless-stopped
networks:
backend:
driver: bridge