-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
77 lines (72 loc) · 2.25 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
version: '3.3'
services:
database:
image: 'postgres:latest'
ports:
- 5432:5432
environment:
POSTGRES_USER: postgres # The PostgreSQL user (useful to connect to the database)
POSTGRES_PASSWORD: postgres # The PostgreSQL password (useful to connect to the database)
POSTGRES_DB: opta-router # The PostgreSQL default database (automatically created at first launch)
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
geo-app:
image: 'pintowar/opta-router:dist-latest'
volumes:
- /tmp/osm:/tmp/osm
environment:
SPRING_PROFILES_ACTIVE: dist,geo-server
GRAPH_OSM_PATH: /tmp/osm/belgium-latest.osm.pbf
GRAPH_OSM_LOCATION: /tmp/osm/gh-tmp
restart: on-failure
healthcheck:
test: [ "CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:8080/actuator/health || exit 1" ]
interval: 10s
timeout: 5s
retries: 5
solver-app:
image: 'pintowar/opta-router:dist-latest'
environment:
SPRING_PROFILES_ACTIVE: dist,solver
restart: on-failure
healthcheck:
test: [ "CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:8080/actuator/health || exit 1" ]
interval: 10s
timeout: 5s
retries: 5
rest-app:
image: 'pintowar/opta-router:dist-latest'
environment:
SPRING_PROFILES_ACTIVE: dist,rest,geo-remote
SPRING_R2DBC_URL: r2dbc:postgresql://database:5432/opta-router
SPRING_FLYWAY_URL: jdbc:postgresql://database:5432/opta-router
GEO_REMOTE_URL: http://app-gateway:8082
depends_on:
database:
condition: service_healthy
geo-app:
condition: service_healthy
restart: on-failure
healthcheck:
test: [ "CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:8080/actuator/health || exit 1" ]
interval: 10s
timeout: 5s
retries: 5
app-gateway:
image: 'nginx:alpine'
ports:
- 8080:8080
- 8081:8081
- 8082:8082
volumes:
- ./docker/nginx.conf:/etc/nginx/nginx.conf
depends_on:
geo-app:
condition: service_healthy
solver-app:
condition: service_healthy
rest-app:
condition: service_healthy