docker file

This commit is contained in:
2025-07-05 02:37:35 +02:00
parent 423b02a195
commit 5a76fe3f79
2 changed files with 42 additions and 0 deletions

13
.dockerignore Normal file
View File

@ -0,0 +1,13 @@
node_modules
npm-debug.log
.git
.gitignore
README.md
.env
.nyc_output
coverage
.vscode
.idea
dist
build
*.log

29
Dockerfile Normal file
View File

@ -0,0 +1,29 @@
# Build stage
FROM node:18-alpine AS builder
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm ci
# Copy source code
COPY . .
# Build the application
RUN npm run build
# Production stage
FROM nginx:alpine
# Copy built application
COPY --from=builder /app/dist /usr/share/nginx/html
# Copy nginx configuration
COPY nginx.conf /etc/nginx/nginx.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]