-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
59 lines (54 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
56
57
58
59
version: '3.2'
services:
webapp:
build:
context: ./web_app
dockerfile: Dockerfile
ports:
- "${WEB_PORT}:8050"
volumes:
- ./web_app:/code
environment:
- DEFAULT_LONGITUDE
- DEFAULT_LATITUDE
- WEB_DEBUG
depends_on:
- dbapp
networks:
- targets_list_network
command: ["python3", "-u", "main.py"]
dbapp:
build:
context: ./database
dockerfile: Dockerfile
volumes:
- ./database/targets_database:/code
links:
- "db:db"
ports:
- "${DATABASE_PORT}:8000"
depends_on:
- db
environment:
- DATABASE_DEBUG
- DATABASE_SECRET_KEY
- POSTGRES_DB
- POSTGRES_USER
- POSTGRES_PASSWORD
networks:
- targets_list_network
command: ["python3.8", "manage.py", "runserver", "0.0.0.0:8000", "--insecure"]
db:
image: postgres
environment:
- POSTGRES_DB
- POSTGRES_USER
- POSTGRES_PASSWORD
volumes:
- pgdata:/var/lib/postgresql/data
networks:
- targets_list_network
volumes:
pgdata:
networks:
targets_list_network: