This commit is contained in:
matthieu42morin 2024-03-16 10:08:34 +01:00
parent 8265e41250
commit c56791cc44
3 changed files with 50 additions and 1 deletions

View File

@ -1,3 +1,22 @@
**/node_modules **/node_modules
**/.next **/.next
**/dist **/dist
.vscode
.git
.gitattributes
.editorconfig
.eslintignore
.eslintrc.cjs
.npmrc
.prettierrc
.pretieriignore
README.md
Dockerfile

1
.gitignore vendored
View File

@ -28,6 +28,7 @@ node_modules
dist dist
dist-ssr dist-ssr
*.local *.local
pnpm-lock.yaml
# Editor directories and files # Editor directories and files
!.vscode/extensions.json !.vscode/extensions.json

29
Dockerfile Normal file
View File

@ -0,0 +1,29 @@
FROM node:18-alpine AS builder
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
RUN npm install -g pnpm && \
echo "Installing pnpm..."
RUN pnpm install --frozen-lockfile && \
echo "Installing deps..."
COPY . .
RUN pnpm run build && \
echo "Building..." && \
pnpm prune --production
FROM node:18-alpine
WORKDIR /app
COPY --from=builder /app/build build/
COPY --from=builder /app/node_modules node_modules/
COPY package.json .
EXPOSE 3000
ENV NODE_ENV=production
CMD [ "node", "build" ]