2022-06-07 12:29:40 +02:00
|
|
|
# FRONTEND
|
2024-03-04 18:32:03 +01:00
|
|
|
FROM node:20-alpine as client
|
2024-03-03 01:34:03 +01:00
|
|
|
ENV PNPM_HOME="/pnpm"
|
|
|
|
ENV PATH="$PNPM_HOME:$PATH"
|
|
|
|
RUN corepack enable
|
|
|
|
|
2021-05-02 13:53:48 +02:00
|
|
|
WORKDIR /tmp
|
2023-05-14 13:52:47 +02:00
|
|
|
COPY . .
|
|
|
|
RUN pnpm install --frozen-lockfile
|
2021-11-11 13:37:21 +01:00
|
|
|
RUN pnpm run build
|
2021-05-02 13:53:48 +02:00
|
|
|
|
|
|
|
|
2022-06-07 12:29:40 +02:00
|
|
|
# BACKEND
|
2024-08-22 18:42:44 +02:00
|
|
|
FROM rust:1.80-alpine as backend
|
2021-05-02 13:53:48 +02:00
|
|
|
WORKDIR /tmp
|
2024-03-15 15:11:34 +01:00
|
|
|
RUN apk add --no-cache libc-dev openssl-dev alpine-sdk
|
2022-10-07 21:28:25 +02:00
|
|
|
COPY ./packages/backend ./
|
2024-05-16 09:55:04 +02:00
|
|
|
RUN RUSTFLAGS="-Ctarget-feature=-crt-static" cargo build --release
|
2021-05-02 13:53:48 +02:00
|
|
|
|
|
|
|
|
2022-06-07 12:29:40 +02:00
|
|
|
# RUNNER
|
2024-03-15 15:11:34 +01:00
|
|
|
FROM alpine:3.19
|
2021-05-02 13:53:48 +02:00
|
|
|
WORKDIR /app
|
2024-05-16 09:55:04 +02:00
|
|
|
RUN apk add --no-cache curl libgcc
|
2022-06-07 12:29:40 +02:00
|
|
|
COPY --from=backend /tmp/target/release/cryptgeon .
|
2023-05-14 13:52:47 +02:00
|
|
|
COPY --from=client /tmp/packages/frontend/build ./frontend
|
2022-07-19 21:55:05 +02:00
|
|
|
ENV FRONTEND_PATH="./frontend"
|
|
|
|
ENV REDIS="redis://redis/"
|
2023-01-13 19:36:26 +01:00
|
|
|
EXPOSE 8000
|
2022-07-16 14:16:54 +02:00
|
|
|
ENTRYPOINT [ "/app/cryptgeon" ]
|