Skip to content

Commit

Permalink
editoast: use core worker through rabbitmq
Browse files Browse the repository at this point in the history
Co-authored-by: ElysaSrc <[email protected]>
  • Loading branch information
Khoyo and ElysaSrc committed Aug 8, 2024
1 parent a1fb2e1 commit 0eee797
Show file tree
Hide file tree
Showing 31 changed files with 1,331 additions and 232 deletions.
23 changes: 5 additions & 18 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,28 +56,15 @@ services:
core:
# This is a dummy container to build the core image
image: ghcr.io/openrailassociation/osrd-edge/osrd-core:${TAG-dev}
container_name: osrd-core
container_name: osrd-core-dummy
build:
context: core
dockerfile: Dockerfile
additional_contexts:
test_data: tests/data
static_assets: assets
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
restart: no
command: "true"

front:
image: ghcr.io/openrailassociation/osrd-edge/osrd-front:${TAG-dev}-${OSRD_FRONT_MODE-devel}
Expand Down Expand Up @@ -108,6 +95,7 @@ services:
depends_on:
postgres: {condition: service_healthy}
redis: {condition: service_healthy}
rabbitmq: {condition: service_healthy}
build:
context: editoast
dockerfile: Dockerfile
Expand All @@ -118,12 +106,11 @@ services:
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"
OSRD_MQ_URL: "amqp://osrd:password@osrd-rabbitmq:5672/%2f"
command:
- /bin/sh
- -c
Expand Down
11 changes: 2 additions & 9 deletions docker/docker-compose.host.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,16 @@ services:
ports: []
network_mode: host

core:
ports: []
network_mode: host
environment:
CORE_EDITOAST_URL: "http://localhost:8090"
OTEL_EXPORTER_OTLP_ENDPOINT: "http://localhost:4317"

editoast:
ports: []
network_mode: host
environment:
PSQL_HOST: "localhost"
EDITOAST_PORT: 8090
OSRD_BACKEND_URL: "http://localhost:8080"
REDIS_URL: "redis://localhost"
DATABASE_URL: "postgres://osrd:password@localhost:5432/osrd"
TELEMETRY_ENDPOINT: "http://localhost:4317"
OSRD_MQ_URL: "amqp://osrd:[email protected]:5672/%2f"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8090/health"]

Expand Down Expand Up @@ -57,7 +50,7 @@ services:
"OTEL_LOGS_EXPORTER=none"
]
OSRDYNE__AMQP_URI: "amqp://osrd:[email protected]:5672/%2f"

jaeger:
ports: []
network_mode: host
Expand Down
5 changes: 5 additions & 0 deletions docker/docker-compose.noopdyne.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version: '3'

services:
osrdyne:
volumes: !reset []
Loading

0 comments on commit 0eee797

Please sign in to comment.