Skip to content

Commit 96b3692

Browse files
committed
docker: add git describe var to gateway image with front
1 parent 62932d4 commit 96b3692

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

docker/gateway-front.dockerfile

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
FROM gateway_build
22

3+
RUN apk add npm && \
4+
npm install -g @import-meta-env/cli && \
5+
rm /etc/nginx/conf.d/default.conf
6+
37
# Copy the front
48
WORKDIR /srv
59
COPY --from=front_build /app/build /srv/front/
10+
COPY --from=front_build /app/.env.example /
611

712
# Copy an example config file
813
COPY --from=gateway_src ./gateway.prod.sample.toml /gateway.sample.toml
914
COPY --chmod=755 ./gateway-entrypoint.sh /srv/entrypoint.sh
1015
ENTRYPOINT ["/srv/entrypoint.sh"]
11-
CMD ["/usr/local/bin/osrd_gateway"]
16+
17+
ARG OSRD_GIT_DESCRIBE
18+
ENV OSRD_GIT_DESCRIBE=${OSRD_GIT_DESCRIBE}
19+
20+
CMD ["sh", "-c", "npx import-meta-env -x /.env.example -p /srv/front/index.html && /usr/local/bin/osrd_gateway'"]

0 commit comments

Comments
 (0)