-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
58 lines (52 loc) · 1.09 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
version: '2'
services:
postgres:
image: postgres:9.6
environment:
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- "${POSTGRES_PORT}:${POSTGRES_PORT}"
client:
image: nginx:stable-alpine
volumes:
- ./client/dist:/usr/share/nginx/html
ports:
- "${NGINX_PORT}:80"
django:
restart: always
env_file: '.env'
image: web
build: ./
command: >
bash -c "python3 wait_for_postgres.py &&
./manage.py migrate &&
./manage.py runserver 0.0.0.0:${DJANGO_PORT}"
volumes:
- ./:/code
- 'cachedata:/cache'
ports:
- "${DJANGO_PORT}:${DJANGO_PORT}"
depends_on:
- postgres
- redis
realtime:
image: web
ports:
- '${REALTIME_PORT}:${REALTIME_PORT}'
env_file: '.env'
command: 'python3 realtime_ws_server.py'
volumes_from:
- django
depends_on:
- redis
- django
redis:
container_name: 'redis'
image: 'redis:3.2.0'
ports:
- '${REDIS_PORT}:${REDIS_PORT}'
volumes:
- 'redisdata:/data'
volumes:
redisdata:
cachedata: