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