-
Notifications
You must be signed in to change notification settings - Fork 40
/
docker-compose.yml
141 lines (132 loc) · 3.93 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
version: '3'
volumes:
psql_data:
redis_data:
services:
postgres:
image: ${OSRD_POSTGIS_IMAGE:-postgis/postgis:16-3.4-alpine}
container_name: osrd-postgres
user: postgres
restart: unless-stopped
ports: ["5432:5432"]
environment:
POSTGRES_PASSWORD: "password"
volumes:
- "psql_data:/var/lib/postgresql/data"
- "./docker/init_db.sql:/docker-entrypoint-initdb.d/init.sql"
healthcheck:
test: ["CMD", "pg_isready", "-d", "postgres://osrd:password@postgres/osrd"]
start_period: 4s
interval: 5s
redis:
image: valkey/valkey:alpine
container_name: osrd-redis
restart: unless-stopped
ports: ["6379:6379"]
volumes:
- "redis_data:/data"
command: "valkey-server --save 30 1 --loglevel warning"
healthcheck:
test: ["CMD", "valkey-cli", "ping"]
start_period: 4s
interval: 5s
core:
image: ghcr.io/openrailassociation/osrd-edge/osrd-core:${TAG-dev}
container_name: osrd-core
build:
context: core
dockerfile: Dockerfile
additional_contexts:
test_data: tests/data
restart: unless-stopped
ports: ["8080:8080"]
command: "java -ea -jar /app/osrd_core.jar api -p 8080"
environment:
CORE_EDITOAST_URL: "http://osrd-editoast"
JAVA_TOOL_OPTIONS: "-javaagent:/app/opentelemetry-javaagent.jar"
CORE_MONITOR_TYPE: "opentelemetry"
OTEL_EXPORTER_OTLP_TRACES_PROTOCOL: "grpc"
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: "http://jaeger:4317"
OTEL_METRICS_EXPORTER: "none"
OTEL_LOGS_EXPORTER: "none"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
start_period: 4s
interval: 5s
front:
image: ghcr.io/openrailassociation/osrd-edge/osrd-front:${TAG-dev}-${OSRD_FRONT_MODE-devel}
container_name: osrd-front
build:
context: front
additional_contexts:
test_data: tests/data
dockerfile: docker/Dockerfile.${OSRD_FRONT_MODE-devel}
args:
OSRD_GIT_DESCRIBE: ${OSRD_GIT_DESCRIBE}
environment:
FRONT_PORT: 3000 # only useful with the prod config
OSRD_EDITOAST_URL: /api
volumes:
- "./front:/app"
- "./tests/data:/tests/data"
restart: unless-stopped
ports: ["3000:3000"]
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000"]
start_period: 4s
interval: 5s
editoast:
image: ghcr.io/openrailassociation/osrd-edge/osrd-editoast:${TAG-dev}
container_name: osrd-editoast
depends_on:
postgres: {condition: service_healthy}
redis: {condition: service_healthy}
build:
context: editoast
dockerfile: Dockerfile
additional_contexts:
test_data: tests/data
restart: unless-stopped
ports: ["8090:80"]
environment:
EDITOAST_PORT: 80
PSQL_HOST: "postgres"
REDIS_URL: "redis://redis"
OSRD_BACKEND_URL: "http://osrd-core:8080"
DATABASE_URL: "postgres://osrd:password@postgres/osrd"
TELEMETRY_KIND: "opentelemetry"
TELEMETRY_ENDPOINT: "http://jaeger:4317"
command:
- /bin/sh
- -c
- "diesel migration run && exec editoast runserver"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/health"]
start_period: 4s
interval: 5s
gateway:
image: ghcr.io/openrailassociation/osrd-edge/osrd-gateway:${TAG-dev}-standalone
container_name: osrd-gateway
build:
context: gateway
dockerfile: Dockerfile
args:
OSRD_GIT_DESCRIBE: ${OSRD_GIT_DESCRIBE}
volumes:
- "./docker/gateway.dev.simple.toml:/gateway.toml"
restart: unless-stopped
ports: ["4000:4000"]
jaeger:
image: jaegertracing/all-in-one:latest
container_name: osrd-jaeger
restart: unless-stopped
ports:
- "4317:4317"
- "4318:4318"
- "16686:16686"
wait-healthy:
depends_on:
editoast: {condition: service_healthy}
restart: "no"
image: alpine:latest
command: "true"