Skip to content

Commit 960fa22

Browse files
committed
docker-compose: use an env var to select image release channel
This allows to pull the images corresponding to specific published versions of OSRD. Usage: `RELEASE_CHANNEL=stable TAG=vX.X.X docker compose pull` Signed-off-by: Baptiste Prevot <[email protected]>
1 parent 28261be commit 960fa22

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

docker-compose.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ services:
8686
core:
8787
# This is a dummy container to build the core image
8888
# and document/provide parameters to other compose files
89-
image: ghcr.io/openrailassociation/osrd-edge/osrd-core:${TAG-dev}
89+
image: ghcr.io/openrailassociation/osrd-${RELEASE_CHANNEL-edge}/osrd-core:${TAG-dev}
9090
container_name: osrd-core-dummy
9191
depends_on:
9292
rabbitmq: { condition: service_healthy }
@@ -112,7 +112,7 @@ services:
112112
command: "true"
113113

114114
editoast:
115-
image: ghcr.io/openrailassociation/osrd-edge/osrd-editoast:${TAG-dev}
115+
image: ghcr.io/openrailassociation/osrd-${RELEASE_CHANNEL-edge}/osrd-editoast:${TAG-dev}
116116
container_name: osrd-editoast
117117
depends_on:
118118
postgres: { condition: service_healthy }
@@ -151,7 +151,7 @@ services:
151151
retries: 6
152152

153153
gateway:
154-
image: ghcr.io/openrailassociation/osrd-edge/osrd-gateway:${TAG-dev}-${GATEWAY_FLAVOR-front}
154+
image: ghcr.io/openrailassociation/osrd-${RELEASE_CHANNEL-edge}/osrd-gateway:${TAG-dev}-${GATEWAY_FLAVOR-front}
155155
container_name: osrd-gateway
156156
build:
157157
context: gateway
@@ -173,7 +173,7 @@ services:
173173
ports: [ "8080:8080" ]
174174

175175
osrdyne:
176-
image: ghcr.io/openrailassociation/osrd-edge/osrd-osrdyne:${TAG-dev}
176+
image: ghcr.io/openrailassociation/osrd-${RELEASE_CHANNEL-edge}/osrd-osrdyne:${TAG-dev}
177177
container_name: osrd-osrdyne
178178
depends_on:
179179
rabbitmq: { condition: service_healthy }

docker/docker-compose.front.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
services:
22
gateway:
3-
image: ghcr.io/openrailassociation/osrd-edge/osrd-gateway:${TAG-dev}-${GATEWAY_FLAVOR-standalone}
3+
image: ghcr.io/openrailassociation/osrd-${RELEASE_CHANNEL-edge}/osrd-gateway:${TAG-dev}-${GATEWAY_FLAVOR-standalone}
44
volumes:
55
- "./docker/gateway.dev.front.toml:/srv/gateway.toml"
66
build:
77
args:
88
SKIP_FRONT: "1"
99

1010
front:
11-
image: ghcr.io/openrailassociation/osrd-edge/osrd-front:${TAG-dev}-dev
11+
image: ghcr.io/openrailassociation/osrd-${RELEASE_CHANNEL-edge}/osrd-front:${TAG-dev}-dev
1212
container_name: osrd-front
1313
build:
1414
context: front
@@ -24,9 +24,9 @@ services:
2424
- "./front:/app"
2525
- "./tests/data:/tests/data"
2626
restart: unless-stopped
27-
ports: [ "3000:3000" ]
27+
ports: ["3000:3000"]
2828
healthcheck:
29-
test: [ "CMD", "curl", "-f", "http://localhost:3000" ]
29+
test: ["CMD", "curl", "-f", "http://localhost:3000"]
3030
start_period: 4s
3131
interval: 5s
3232
retries: 6

docker/docker-compose.host-front.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
services:
22
gateway:
3-
image: ghcr.io/openrailassociation/osrd-edge/osrd-gateway:${TAG-dev}-${GATEWAY_FLAVOR-standalone}
3+
image: ghcr.io/openrailassociation/osrd-${RELEASE_CHANNEL-edge}/osrd-gateway:${TAG-dev}-${GATEWAY_FLAVOR-standalone}
44
volumes:
55
- "./docker/gateway.dev.host-front.toml:/srv/gateway.toml"
66
build:
77
args:
88
SKIP_FRONT: "1"
99

1010
front:
11-
image: ghcr.io/openrailassociation/osrd-edge/osrd-front:${TAG-dev}-dev
11+
image: ghcr.io/openrailassociation/osrd-${RELEASE_CHANNEL-edge}/osrd-front:${TAG-dev}-dev
1212
container_name: osrd-front
1313
build:
1414
context: front
@@ -24,9 +24,9 @@ services:
2424
- "./front:/app"
2525
- "./tests/data:/tests/data"
2626
restart: unless-stopped
27-
ports: [ "3000:3000" ]
27+
ports: ["3000:3000"]
2828
healthcheck:
29-
test: [ "CMD", "curl", "-f", "http://localhost:3000" ]
29+
test: ["CMD", "curl", "-f", "http://localhost:3000"]
3030
start_period: 4s
3131
interval: 5s
3232
retries: 6

0 commit comments

Comments
 (0)