-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
66 lines (61 loc) · 1.29 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
version: "3.9"
services:
redis:
image: redis:6-alpine
container_name: redis-chatapp
ports:
- 6379:6379
networks:
- redis-django
chatappdjango:
build:
context: .
dockerfile: Dockerfile
container_name: chatappdjango
command: >
sh -c "python manage.py migrate --noinput &&
python manage.py collectstatic --noinput &&
gunicorn ChatApp.wsgi:application --bind 0.0.0.0:8000"
volumes:
- .:/app/
- ./staticfiles:/app/staticfiles/
- ./mediafiles:/app/mediafiles/
expose:
- 8000
depends_on:
- redis
networks:
- redis-django
asgiserver:
build:
context: .
dockerfile: Dockerfile
container_name: asgiserver
command: daphne ChatApp.asgi:application -b 0.0.0.0 -p 9000
volumes:
- .:/app/
expose:
- 9000
depends_on:
- redis
networks:
- redis-django
nginx:
build:
context: ./nginx
dockerfile: Dockerfile
container_name: nginx
restart: always
volumes:
- ./staticfiles:/app/staticfiles/
- ./mediafiles:/app/mediafiles/
ports:
- 8000:80
depends_on:
- chatappdjango
- asgiserver
networks:
- redis-django
networks:
redis-django:
driver: bridge