mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-05-05 13:57:10 -04:00
17 lines
562 B
Docker
17 lines
562 B
Docker
# build stage
|
|
FROM node:lts-alpine AS build-stage
|
|
# Set environment variables for non-interactive npm installs
|
|
ENV NPM_CONFIG_LOGLEVEL warn
|
|
ENV CI true
|
|
WORKDIR /app
|
|
COPY package.json pnpm-lock.yaml ./
|
|
RUN npm install -g pnpm && pnpm i --frozen-lockfile
|
|
COPY . .
|
|
RUN pnpm build
|
|
|
|
# production stage
|
|
FROM nginx:stable-alpine@sha256:089520833b93077841d3cdc7ab1f7b817de73c7e10070b71b85fa97da7623dbe AS production-stage
|
|
COPY --from=build-stage /app/dist /usr/share/nginx/html
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
EXPOSE 80
|
|
CMD ["nginx", "-g", "daemon off;"]
|