0
Fork 0
mirror of https://codeberg.org/SafeTwitch/safetwitch.git synced 2025-04-12 21:31:19 -05:00

forgot to remove this

it was from something i made a while ago but changed to this
This commit is contained in:
igna 2024-02-12 16:09:51 +00:00
parent 6b47fb5e89
commit 0498bff524

View file

@ -1,22 +1,18 @@
# Stage 1: Node image for building frontend assets
FROM node:20 AS base
FROM docker.io/node:20 AS base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
COPY . /app
WORKDIR /app
# Stage 2: Production dependencies
FROM base AS prod-deps
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile
# Stage 3: Build frontend assets
FROM base AS build
# Stage 2: Build frontend assets
FROM docker.io/base AS build
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
RUN pnpm run build
# Stage 4: Nginx for serving frontend assets
FROM nginx:alpine AS nginx
# Stage 3: Nginx for serving frontend assets
FROM docker.io/nginx:alpine AS nginx
COPY ./nginx.conf /etc/nginx/nginx.conf
RUN mkdir /app
COPY --from=build /app/dist /app