-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
46 lines (46 loc) · 913 Bytes
/
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
version: '3.0'
services:
postgres:
restart: always
image: postgres:10
environment:
- POSTGRES_USER=${DB_USERNAME}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
volumes:
- "dbdata:/var/lib/postgresql/data"
networks:
- db_nw
app:
restart: always
build: .
environment:
- _DB_USERNAME=${DB_USERNAME}
- _DB_PASSWORD=${DB_PASSWORD}
- _DB_NAME=${DB_NAME}
- _SECRETE_KEY=${SECRETE_KEY}
volumes:
- ./instadam:/home/flaskapp/src
networks:
- db_nw
- web_nw
depends_on:
- postgres
entrypoint: ["python","manage.py","deploy"]
nginx:
image: "nginx:1.13.5"
ports:
- "8080:80"
volumes:
- ./conf.d:/etc/nginx/conf.d
networks:
- web_nw
depends_on:
- app
networks:
db_nw:
driver: bridge
web_nw:
driver: bridge
volumes:
dbdata: