mirror of
https://github.com/CorentinTh/it-tools.git
synced 2024-11-20 15:38:04 +03:00
refactor(docker): improved docker config (#700)
This commit is contained in:
parent
02e68d3f56
commit
020e9cbe41
5
.dockerignore
Normal file
5
.dockerignore
Normal file
@ -0,0 +1,5 @@
|
||||
node_modules
|
||||
playwright-report
|
||||
coverage
|
||||
dist
|
||||
test-results
|
@ -1,13 +1,16 @@
|
||||
# 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 npm install -g pnpm
|
||||
RUN pnpm i --frozen-lockfile
|
||||
RUN pnpm build
|
||||
|
||||
# production stage
|
||||
FROM nginx:stable-alpine AS production-stage
|
||||
FROM nginxinc/nginx-unprivileged:stable-alpine AS production-stage
|
||||
COPY --from=build-stage /app/dist /usr/share/nginx/html
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
EXPOSE 80
|
||||
|
Loading…
Reference in New Issue
Block a user