Added docker configuration

This commit is contained in:
Théo 2023-04-11 11:17:26 +02:00
parent fef736f547
commit 1de57afe45
2 changed files with 28 additions and 0 deletions

5
.dockerignore Normal file
View file

@ -0,0 +1,5 @@
.git
Dockerfile
node_modules
*.md
.env.*

23
Dockerfile Normal file
View file

@ -0,0 +1,23 @@
FROM node:16-alpine AS builder
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY package.json .
COPY pnpm-lock.yaml .
RUN npm install -g pnpm && \
pnpm install
COPY . .
RUN npm run build
ENV NODE_ENV=production
EXPOSE 3000
ENV PORT 3000
CMD ["pnpm", "start"]