Commit 7fd5a60 1 parent b443b6a commit 7fd5a60 Copy full SHA for 7fd5a60
File tree 3 files changed +12
-1
lines changed
3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,9 @@ services:
3
3
image : ghcr.io/openrailassociation/osrd-edge/osrd-gateway:${TAG-dev}-${GATEWAY_FLAVOR-standalone}
4
4
volumes :
5
5
- " ./docker/gateway.dev.front.toml:/srv/gateway.toml"
6
+ build :
7
+ args :
8
+ SKIP_BAD_FRONT : " 1"
6
9
7
10
front :
8
11
image : ghcr.io/openrailassociation/osrd-edge/osrd-front:${TAG-dev}-dev
Original file line number Diff line number Diff line change @@ -3,6 +3,9 @@ services:
3
3
image : ghcr.io/openrailassociation/osrd-edge/osrd-gateway:${TAG-dev}-${GATEWAY_FLAVOR-standalone}
4
4
volumes :
5
5
- " ./docker/gateway.dev.host-front.toml:/srv/gateway.toml"
6
+ build :
7
+ args :
8
+ SKIP_BAD_FRONT : " 1"
6
9
7
10
front :
8
11
image : ghcr.io/openrailassociation/osrd-edge/osrd-front:${TAG-dev}-dev
Original file line number Diff line number Diff line change @@ -63,6 +63,9 @@ CMD ["/usr/local/bin/osrd_gateway"]
63
63
FROM node:23-bookworm AS front_build
64
64
WORKDIR /app
65
65
66
+ # Add build argument for skipping failed front
67
+ ARG SKIP_BAD_FRONT=0
68
+
66
69
# Build dependencies
67
70
COPY --from=front_src package.json package-lock.json /app/
68
71
RUN npm install --frozen-lockfile
@@ -74,7 +77,9 @@ ENV VITE_OSRD_GIT_DESCRIBE=${OSRD_GIT_DESCRIBE}
74
77
# Generate the licenses file and build
75
78
COPY --from=front_src . /app
76
79
ENV NODE_OPTIONS="--max_old_space_size=4096"
77
- RUN npm run generate-licenses && npm run build
80
+ RUN (npm run generate-licenses && npm run build) || \
81
+ (test "$SKIP_BAD_FRONT" = "1" && mkdir -p build && \
82
+ echo '<html><body><h1>Front build failed : check logs.</h1></body></html>' > build/index.html)
78
83
79
84
# ######################
80
85
# Running env : front #
You can’t perform that action at this time.
0 commit comments