Skip to content

Commit

Permalink
docker-compose: use an env var to select image release channel
Browse files Browse the repository at this point in the history
This allows to pull the images corresponding to specific published versions of OSRD.
Usage: `RELEASE_CHANNEL=stable TAG=vX.X.X docker compose pull`

Also, add an env var for osrdyne, in order to use the same uri for core workers as the ones for the other services.

Signed-off-by: Baptiste Prevot <[email protected]>
  • Loading branch information
Castavo committed Mar 7, 2025
1 parent 365ce43 commit 71b91a3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
9 changes: 5 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ services:
core:
# This is a dummy container to build the core image
# and document/provide parameters to other compose files
image: ghcr.io/openrailassociation/osrd-edge/osrd-core:${TAG-dev}
image: ghcr.io/openrailassociation/osrd-${RELEASE_CHANNEL-edge}/osrd-core:${TAG-dev}
container_name: osrd-core-dummy
depends_on:
rabbitmq: { condition: service_healthy }
Expand All @@ -112,7 +112,7 @@ services:
command: "true"

editoast:
image: ghcr.io/openrailassociation/osrd-edge/osrd-editoast:${TAG-dev}
image: ghcr.io/openrailassociation/osrd-${RELEASE_CHANNEL-edge}/osrd-editoast:${TAG-dev}
container_name: osrd-editoast
depends_on:
postgres: { condition: service_healthy }
Expand Down Expand Up @@ -151,7 +151,7 @@ services:
retries: 6

gateway:
image: ghcr.io/openrailassociation/osrd-edge/osrd-gateway:${TAG-dev}-${GATEWAY_FLAVOR-front}
image: ghcr.io/openrailassociation/osrd-${RELEASE_CHANNEL-edge}/osrd-gateway:${TAG-dev}-${GATEWAY_FLAVOR-front}
container_name: osrd-gateway
build:
context: gateway
Expand All @@ -173,7 +173,7 @@ services:
ports: [ "8080:8080" ]

osrdyne:
image: ghcr.io/openrailassociation/osrd-edge/osrd-osrdyne:${TAG-dev}
image: ghcr.io/openrailassociation/osrd-${RELEASE_CHANNEL-edge}/osrd-osrdyne:${TAG-dev}
container_name: osrd-osrdyne
depends_on:
rabbitmq: { condition: service_healthy }
Expand All @@ -191,6 +191,7 @@ services:
environment:
RUST_LOG: "info"
OSRDYNE__OPENTELEMETRY__ENDPOINT: "http://osrd-jaeger:4317"
OSRDYNE__WORKER_DRIVER__WORKER_IMAGE: "ghcr.io/openrailassociation/osrd-${RELEASE_CHANNEL-edge}/osrd-core:${TAG-dev}"

jaeger:
image: jaegertracing/jaeger:latest
Expand Down
4 changes: 2 additions & 2 deletions docker/docker-compose.front.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
services:
gateway:
image: ghcr.io/openrailassociation/osrd-edge/osrd-gateway:${TAG-dev}-${GATEWAY_FLAVOR-standalone}
image: ghcr.io/openrailassociation/osrd-${RELEASE_CHANNEL-edge}/osrd-gateway:${TAG-dev}-${GATEWAY_FLAVOR-standalone}
volumes:
- "./docker/gateway.dev.front.toml:/srv/gateway.toml"
build:
args:
SKIP_FRONT: "1"

front:
image: ghcr.io/openrailassociation/osrd-edge/osrd-front:${TAG-dev}-dev
image: ghcr.io/openrailassociation/osrd-${RELEASE_CHANNEL-edge}/osrd-front:${TAG-dev}-dev
container_name: osrd-front
build:
context: front
Expand Down
4 changes: 2 additions & 2 deletions docker/docker-compose.host-front.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
services:
gateway:
image: ghcr.io/openrailassociation/osrd-edge/osrd-gateway:${TAG-dev}-${GATEWAY_FLAVOR-standalone}
image: ghcr.io/openrailassociation/osrd-${RELEASE_CHANNEL-edge}/osrd-gateway:${TAG-dev}-${GATEWAY_FLAVOR-standalone}
volumes:
- "./docker/gateway.dev.host-front.toml:/srv/gateway.toml"
build:
args:
SKIP_FRONT: "1"

front:
image: ghcr.io/openrailassociation/osrd-edge/osrd-front:${TAG-dev}-dev
image: ghcr.io/openrailassociation/osrd-${RELEASE_CHANNEL-edge}/osrd-front:${TAG-dev}-dev
container_name: osrd-front
build:
context: front
Expand Down

0 comments on commit 71b91a3

Please sign in to comment.