mirror of
https://github.com/ckaczor/HomeMonitor.git
synced 2026-01-13 17:22:54 -05:00
19 lines
539 B
Docker
19 lines
539 B
Docker
# build stage
|
|
FROM node:lts-alpine AS build-stage
|
|
RUN corepack enable && corepack prepare pnpm@latest --activate
|
|
WORKDIR /app
|
|
COPY package*.json ./
|
|
RUN pnpm install
|
|
COPY . .
|
|
RUN pnpm run build
|
|
|
|
# production stage
|
|
FROM nginx:stable-alpine AS production-stage
|
|
COPY nginx/default.conf /etc/nginx/conf.d/
|
|
RUN rm -rf /usr/share/nginx/html/*
|
|
COPY --from=build-stage /app/dist /usr/share/nginx/html
|
|
EXPOSE 80
|
|
COPY ./nginx/entrypoint.sh ./entrypoint.sh
|
|
RUN chmod +x ./entrypoint.sh
|
|
ENTRYPOINT ["./entrypoint.sh"]
|
|
CMD ["nginx", "-g", "daemon off;"] |