-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
89 lines (83 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
87
88
89
version: "2"
services:
web:
restart: always
build: ./backend
image: webworkerimage
working_dir: /usr/src/app
expose:
- "8000"
links:
- postgres:postgres
volumes:
- ./backend:/usr/src/app
- ./backups:/usr/src/backups
- /usr/src/app/static
- mediadata:/usr/src/app/media
env_file: .env
environment:
DEBUG: 'true'
VIRTUAL_HOST: 'backend'
command: /usr/local/bin/gunicorn backend.wsgi:application -w 4 -b 0.0.0.0:8000 --reload --log-level debug
stdin_open: true
tty: true
networks:
- api-tier
- back-tier
node:
restart: always
build: ./frontend
container_name: eth-buenos-aires-node
command: ["npm", "start"]
environment:
VIRTUAL_HOST: 'frontend'
volumes:
- ./frontend:/usr/src/app
- /usr/src/app/node_modules
expose:
- "3000"
stdin_open: true
tty: true
networks:
- front-tier
nginx:
restart: always
build: ./nginx
container_name: eth-buenos-aires-nginx
env_file: .env
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/sites-enabled:/etc/nginx
- /var/run/docker.sock:/tmp/docker.sock:ro
volumes_from:
- web
- node
depends_on:
- web
- node
links:
- web
- node
networks:
- front-tier
- api-tier
postgres:
restart: always
image: postgres:10.4
container_name: eth-buenos-aires-postgres
volumes:
- pgdata:/var/lib/postgresql/data/
networks:
- back-tier
volumes:
pgdata:
mediadata:
networks:
front-tier:
driver: bridge
api-tier:
driver: bridge
back-tier:
driver: bridge