version: '3' volumes: psql_data: redis_data: services: postgres: image: ${OSRD_POSTGIS_IMAGE:-postgis/postgis:15-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: redis container_name: osrd-redis restart: unless-stopped ports: ["6379:6379"] volumes: - "redis_data:/data" command: "redis-server --save 30 1 --loglevel warning" healthcheck: test: ["CMD", "redis-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"] 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 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"