-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
139 lines (129 loc) · 2.91 KB
/
docker-compose.yml
File metadata and controls
139 lines (129 loc) · 2.91 KB
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
version: "3.4"
x-base: &base
env_file: backend/.env
build:
context : backend/
dockerfile: Dockerfile
#target: local
args:
- SCENARIO=local
- PYTHON_VBASE=3.7.4-slim-buster
- PYTHON_VFINAL=3.7.4-slim-buster
services:
db:
container_name: postgres
image: postgres:alpine
volumes:
- dbdata:/pgdata
env_file: db/env
app:
<<: *base
container_name: app
entrypoint: ['entrypoints/start_server.sh']
volumes:
- ./backend:/backend
- ./backend/static:/backend/static # <-- bind the static volume
- ./backend/media:/backend/media # <-- bind the media volume
healthcheck:
test: 'curl --fail http://localhost:8000/api/ || exit'
interval: 1m
timeout: 10s
retries: 3
depends_on:
- db
links:
- redis
expose:
- "8000"
celery:
<<: *base
container_name: celery
entrypoint: ['entrypoints/start_worker.sh']
volumes:
- ./backend:/backend
depends_on:
- app
- redis
links:
- app:app
- redis:redis
flower:
<<: *base
container_name: flower
entrypoint: ['entrypoints/start_task_monitor.sh']
volumes:
- ./backend:/backend
depends_on:
- app
- redis
links:
- app:app
- redis:redis
expose:
- "8888"
channels:
<<: *base
container_name: channels
entrypoint: ['entrypoints/start_async_server.sh']
volumes:
- ./backend:/backend
healthcheck:
test: ["NONE"]
#test: 'curl -i -N -f -H "Connection: Upgrade" -H "Upgrade: websocket" -H "Host: localhost" -H "Origin: http://localhost/" -H "Sec-WebSocket-Key: IRhw449z7G0Mov9CahJ+Ow==" -H "Sec-WebSocket-Version: 13" http://localhost:9000/ws/test || exit'
#interval: 1m
#timeout: 10s
#retries: 3
depends_on:
- db
- redis
- app
links:
- app:app
- redis:redis
- db:db
expose:
- "9000"
redis:
image: redis:alpine
container_name: redis
frontend:
build:
network: host
context : frontend/
dockerfile: Dockerfile
container_name: react
entrypoint: ['./entrypoint.sh']
volumes:
- ./frontend/:/frontend
- modules:/frontend/node_modules
env_file: frontend/.env
ports:
- '3000:3000'
links:
- app:app
- proxy:proxy
depends_on:
- app
proxy:
container_name: proxy_nginx
image: nginx:alpine
volumes:
- ./proxy/:/etc/nginx/conf.d
- ./backend/static:/backend/static # <-- bind the static volume
- ./backend/media:/backend/media # <-- bind the media volume
- ./frontend/build:/var/www/frontend
ports:
- "80:80"
- "443:443"
links:
- app:app
- channels:channels
depends_on:
- app
- channels
volumes:
dbdata:
backend:
modules:
static_volume:
media_volume: