mirror of
https://github.com/KoriIku/luxirty-search
synced 2024-11-21 16:18:13 +00:00
18 lines
446 B
Docker
18 lines
446 B
Docker
FROM node:20-slim AS base
|
|
|
|
ENV PNPM_HOME="/pnpm"
|
|
ENV PATH="$PNPM_HOME:$PATH"
|
|
RUN corepack enable
|
|
COPY . /app
|
|
WORKDIR /app
|
|
|
|
FROM base AS build
|
|
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm i --frozen-lockfile
|
|
RUN pnpm build
|
|
|
|
# Production stage
|
|
FROM nginx:stable-alpine as production-stage
|
|
COPY ./conf/nginx.conf /etc/nginx/conf.d/default.conf
|
|
COPY --from=build /app/dist /usr/share/nginx/html
|
|
EXPOSE 80
|
|
CMD ["nginx", "-g", "daemon off;"] |