Skip to content

Commit 7664b23

Browse files
committed
actions: fix the dockerhub build
1 parent aade493 commit 7664b23

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

docker/docker-bake.hcl

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ target "gateway-embedded-front" {
5858
dockerfile = "gateway-embedded-front.dockerfile"
5959
context = "docker"
6060
contexts = {
61-
built_front = "target:front-nginx"
61+
front = "./front"
6262
gateway = "./gateway"
6363
}
6464
}

docker/gateway-embedded-front.dockerfile

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# syntax=docker/dockerfile:1
22

3+
### FRONT BUILD STAGE
4+
5+
FROM node:18-alpine as front_build
6+
7+
WORKDIR /app
8+
9+
# Build dependencies
10+
COPY --from=front package.json yarn.lock /app/
11+
RUN yarn install
12+
13+
# Generate the licenses file and build
14+
COPY --from=front . /app
15+
RUN yarn generate-licenses && yarn build
16+
317
### GATEWAY BUILD STAGE
418

519
FROM lukemathwalker/cargo-chef:latest AS chef
@@ -42,7 +56,7 @@ ENV OSRD_GIT_DESCRIBE=${OSRD_GIT_DESCRIBE}
4256

4357
# Copy the front
4458
WORKDIR /srv
45-
COPY --from=built_front /srv /srv/front/
59+
COPY --from=front_build /app/build /srv/front/
4660

4761
# Copy an example config file
4862
COPY --from=gateway ./gateway.prod.sample.toml /gateway.sample.toml

0 commit comments

Comments
 (0)