-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
106 lines (106 loc) · 2.43 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
version: '3.9'
services:
nginx:
container_name: lineShaper-proxyServer
image: nginx:1.19
depends_on:
postgis:
condition: service_healthy
ports:
- 9001:80
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- ./index.html:/home/index.html
- ./router/src/favicon.ico:/home/favicon.ico
editor:
container_name: lineShaper-mapEditor
build:
context: ./editor/
dockerfile: Dockerfile
depends_on:
postgis:
condition: service_healthy
environment:
TZ: "Europe/Bratislava"
deploy:
restart_policy:
condition: on-failure
delay: 3s
max_attempts: 3
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
router:
container_name: lineShaper-lineRouter
build:
context: ./router/
dockerfile: Dockerfile
depends_on:
postgis:
condition: service_healthy
environment:
TZ: "Europe/Bratislava"
deploy:
restart_policy:
condition: on-failure
delay: 3s
max_attempts: 3
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
api:
container_name: lineShaper-api
build:
context: ./api/
dockerfile: Dockerfile
ports:
- ${API_PORT}:${API_PORT}
depends_on:
postgis:
condition: service_healthy
environment:
TZ: "Europe/Bratislava"
EDITOR_AUTH: $EDITOR_AUTH
ROUTER_AUTH: $ROUTER_AUTH
deploy:
restart_policy:
condition: on-failure
delay: 3s
max_attempts: 3
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
postgis:
container_name: lineShaper-db
image: postgis/postgis:16-master
volumes:
- ./api/:/docker-entrypoint-initdb.d/
- ./postgres-data:/var/lib/postgresql/data
ports:
- ${DB_PORT}:${DB_PORT}
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_DATABASE}
PGPORT: ${DB_PORT}
PGUSER: ${DB_USER}
TZ: "Europe/Bratislava"
deploy:
restart_policy:
condition: on-failure
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
healthcheck:
test: ["CMD-SHELL", "pg_isready -d ${DB_DATABASE} -U ${DB_USER}"]
interval: 5s
timeout: 5s
retries: 5