-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
53 lines (52 loc) · 1.13 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
version: '3.1'
services:
db:
restart: unless-stopped
image: postgres:10-alpine
volumes:
- ./data/postgres:/var/lib/postgresql/data
- ./data/backup:/backups
- ./postgres/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
- ./postgres/bin:/root/bin
environment:
DB_NAME: potaje
DB_USER: potaje
DB_PASS: pass
DB_SERVICE: db
DB_PORT: 5432
expose:
- "5432"
ports:
- "5432:5432"
networks:
- potaje
backend:
build: ./
command: potaje runserver 0.0.0.0:8000
volumes:
- .:/usr/src/app
- ./static:/usr/src/app/potaje/static
- ./media:/usr/src/app/potaje/media
environment:
DB_URL: psql://potaje:pass@db:5432/potaje
DEBUG: "True"
ports:
- "8000:8000"
depends_on:
- db
networks:
- potaje
nginx:
image: nginx:alpine
volumes:
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf:ro
- ./static:/usr/share/nginx/static
- ./media:/usr/share/nginx/media
ports:
- "80:80"
networks:
- potaje
depends_on:
- backend
networks:
potaje: