Compare commits

...

12 Commits

Author SHA1 Message Date
Natty c28254b222
Build things before user is modified
ci/woodpecker/push/ociImagePush Pipeline was successful Details
2023-11-05 22:43:07 +01:00
Natty 0073eaa169
Build things before user is modified
ci/woodpecker/push/ociImagePush Pipeline failed Details
2023-11-05 22:41:30 +01:00
Natty 74c9d3b5e3
Install pnpm deps at the beginning
ci/woodpecker/push/ociImagePush Pipeline failed Details
2023-11-05 22:36:09 +01:00
Natty 8b83350651
Enable Corepack and pnpm at the beginning
ci/woodpecker/push/ociImagePush Pipeline failed Details
2023-11-05 22:21:15 +01:00
Natty 739ebdd511
Fixed the Dockerfile structure
ci/woodpecker/push/ociImagePush Pipeline failed Details
2023-11-05 21:54:55 +01:00
Natty 3e8afeee62
Install Corepack from NPM
ci/woodpecker/push/ociImagePush Pipeline failed Details
2023-11-05 21:22:37 +01:00
Natty 2a0bbb59c6
AAAAAAAAAAAAA
ci/woodpecker/push/ociImagePush Pipeline failed Details
2023-11-05 21:12:33 +01:00
Natty c7d1ce7ff5
Newer base image
ci/woodpecker/push/ociImagePush Pipeline failed Details
2023-11-05 21:11:07 +01:00
Natty b7c6d3810a
Missed an APT update
ci/woodpecker/push/ociImagePush Pipeline failed Details
2023-11-05 20:58:25 +01:00
Natty b386d4618c
Boop
ci/woodpecker/push/ociImagePush Pipeline failed Details
2023-11-05 20:56:32 +01:00
Natty a814e9dae7
Fixed the Dockerfile
ci/woodpecker/push/ociImagePush Pipeline failed Details
2023-11-05 20:50:00 +01:00
Natty 77966076ec
Fixed the Dockerfile
ci/woodpecker/push/ociImagePush Pipeline failed Details
2023-11-05 20:48:13 +01:00
1 changed files with 24 additions and 25 deletions

View File

@ -1,20 +1,25 @@
FROM docker.io/alpine:3.18 as build_fe FROM docker.io/rust:1.73-bookworm as build
RUN apk add --no-cache --no-progress git alpine-sdk nodejs-current npm
WORKDIR /fe_calckey
COPY ./fe_calckey/frontend ./frontend
WORKDIR /fe_calckey/frontend
RUN corepack enable && corepack prepare pnpm@latest --activate && pnpm i --frozen-lockfile
RUN env NODE_ENV=production sh -c "pnpm run build && pnpm run gulp"
FROM docker.io/rust:1.71-bullseye as build
RUN update-ca-certificates RUN update-ca-certificates
RUN apt update
RUN apt install -y git nodejs npm
RUN npm install -g corepack
RUN corepack enable && corepack prepare pnpm@latest --activate
WORKDIR /magnetar
COPY ./ .
WORKDIR /magnetar/fe_calckey/frontend
RUN pnpm i --frozen-lockfile
WORKDIR /magnetar
RUN cargo build --release --locked --workspace --bins
WORKDIR /magnetar/fe_calckey/frontend
RUN env NODE_ENV=production sh -c "pnpm run build && pnpm run gulp"
ENV USER=magnetar ENV USER=magnetar
ENV UID=10001 ENV UID=10001
@ -26,12 +31,6 @@ RUN adduser \
--uid "${UID}" \ --uid "${UID}" \
"${USER}" "${USER}"
WORKDIR /magnetar
COPY ./ .
RUN cargo build --release --locked --workspace --bins
FROM docker.io/debian:bullseye-slim FROM docker.io/debian:bullseye-slim
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
@ -42,10 +41,10 @@ COPY --from=build /etc/group /etc/group
WORKDIR /magnetar WORKDIR /magnetar
WORKDIR /magnetar/fe_calckey/frontend WORKDIR /magnetar/fe_calckey/frontend
COPY --from=build_fe /fe_calckey/frontend/built ./built COPY --from=build /magnetar/fe_calckey/frontend/built ./built
COPY --from=build_fe /fe_calckey/frontend/assets ./assets COPY --from=build /magnetar/fe_calckey/frontend/assets ./assets
COPY --from=build_fe /fe_calckey/frontend/client/assets ./client/assets COPY --from=build /magnetar/fe_calckey/frontend/client/assets ./client/assets
COPY --from=build_fe /fe_calckey/frontend/assets-be ./assets-be COPY --from=build /magnetar/fe_calckey/frontend/assets-be ./assets-be
WORKDIR /magnetar WORKDIR /magnetar
@ -59,4 +58,4 @@ USER magnetar:magnetar
EXPOSE 4938/tcp EXPOSE 4938/tcp
EXPOSE 4939/tcp EXPOSE 4939/tcp
ENTRYPOINT ["/magnetar/magnetar"] ENTRYPOINT ["/magnetar/magnetar"]