-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
88 lines (83 loc) · 2.1 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
services:
db:
image: postgres:latest
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: ${PS2MAP_DB_NAME}
volumes:
- db-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
db_init:
build:
context: https://github.com/ps2map/ps2map-schema.git
dockerfile: Dockerfile
environment:
PS2MAP_SERVICE_ID: ${PS2MAP_SERVICE_ID}
PS2MAP_DB_HOST: db
PS2MAP_DB_PORT: 5432
PS2MAP_DB_NAME: ${PS2MAP_DB_NAME}
PS2MAP_DB_USER: postgres
PS2MAP_DB_PASS: postgres
depends_on:
db:
condition: service_healthy
command: ["python3", "-m", "bootstrap"]
api:
build:
context: https://github.com/ps2map/ps2map-api.git
dockerfile: Dockerfile
environment:
PS2MAP_SERVICE_ID: ${PS2MAP_SERVICE_ID}
PS2MAP_DB_HOST: db
PS2MAP_DB_PORT: 5432
PS2MAP_DB_NAME: ${PS2MAP_DB_NAME}
PS2MAP_DB_USER: postgres
PS2MAP_DB_PASS: postgres
ports:
- "5001:5000"
depends_on:
db:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:5000/server"]
interval: 30s
timeout: 10s
retries: 5
command: ["python3", "-m", "server"]
web:
build:
context: .
dockerfile: frontend/Dockerfile
environment:
API_URL: http://localhost:5001/
ports:
- "8080:80"
depends_on:
api:
condition: service_healthy
volumes:
- ./frontend/nginx.conf:/etc/nginx/nginx.conf
territory:
build:
context: https://github.com/ps2map/ps2map-territory.git
dockerfile: Dockerfile
environment:
PS2MAP_SERVICE_ID: ${PS2MAP_SERVICE_ID}
PS2MAP_DB_HOST: db
PS2MAP_DB_PORT: 5432
PS2MAP_DB_NAME: ${PS2MAP_DB_NAME}
PS2MAP_DB_USER: postgres
PS2MAP_DB_PASS: postgres
depends_on:
db:
condition: service_healthy
api:
condition: service_healthy
command: ["python3", "-m", "app"]
volumes:
db-data: