-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathdocker-compose.yml
48 lines (47 loc) · 996 Bytes
/
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
version: '3.7'
services:
redis:
image: redis
restart: always
dj-chat.wsgi:
build: .
image: "dj-chat:latest"
container_name: "dj-chat-g-unicorn"
command: bash -c "python manage.py migrate&&gunicorn -w 1 -k gevent -b 0.0.0.0:8000 dj_chat.wsgi:application"
depends_on:
- redis
links:
- redis
expose:
- "8000"
env_file:
- docker.env
volumes:
- .:/dj-chat
dj-chat.asgi:
image: "dj-chat:latest"
container_name: "dj-chat-daphne"
command: bash -c "daphne -b 0.0.0.0 -p 8001 dj_chat.asgi:application"
depends_on:
- redis
links:
- redis
expose:
- "8001"
env_file:
- docker.env
volumes:
- .:/dj-chat
nginx:
build:
context: .
dockerfile: ./nginx/Dockerfile
image: "nginx-chat"
container_name: "nginx-chat"
depends_on:
- dj-chat.wsgi
- dj-chat.asgi
volumes:
- ./static:/home/ubuntu/static
ports:
- "80:80"