-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
55 lines (50 loc) · 1.11 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
version: '3'
services:
nginx:
image: awsdemo-nginx:latest
ports:
- "80:80"
volumes:
- static_volume:/usr/src/app/staticfiles
- media_volume:/usr/src/app/mediafiles
depends_on:
- web
networks:
- backend_net
web:
image: awsdemo-app:latest
command: gunicorn awsdemo.wsgi:application --reload --bind 0.0.0.0:8000
volumes:
- ./app/:/usr/src/app/
- static_volume:/usr/src/app/staticfiles
- media_volume:/usr/src/app/mediafiles
environment:
- SQL_ENGINE=postgresql
- SQL_DATABASE=awsdemo
- SQL_USER=awsdemo
- SQL_PASS=awsdemo
- SQL_HOST=db
- SQL_PORT=5432
- DEBUG=True
depends_on:
- db
networks:
- backend_net
db:
image: postgres:11.2-alpine
volumes:
- postgres_data:/var/lib/postgresql/data/
- backups:/var/lib/postgresql/backups/
environment:
- POSTGRES_DB=awsdemo
- POSTGRES_USER=awsdemo
- POSTGRES_PASSWORD=awsdemo
networks:
- backend_net
volumes:
postgres_data:
static_volume:
media_volume:
backups:
networks:
backend_net: