mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-19 22:45:06 -04:00
refactor(docker): improved docker config (#700)
This commit is contained in:
parent
02e68d3f56
commit
020e9cbe41
2 changed files with 11 additions and 3 deletions
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
|
# build stage
|
||||||
FROM node:lts-alpine AS 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
|
WORKDIR /app
|
||||||
|
COPY package.json pnpm-lock.yaml ./
|
||||||
|
RUN npm install -g pnpm && pnpm i --frozen-lockfile
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN npm install -g pnpm
|
|
||||||
RUN pnpm i --frozen-lockfile
|
|
||||||
RUN pnpm build
|
RUN pnpm build
|
||||||
|
|
||||||
# production stage
|
# 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 --from=build-stage /app/dist /usr/share/nginx/html
|
||||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue