tschunkorder/frontend/Dockerfile
Jan Felix Wiebe 5c81310530
Some checks failed
CI / Backend Tests (push) Successful in 3m10s
CI / Frontend Build (push) Successful in 3m11s
CI Simple / Test and Build (push) Failing after 4m9s
CI / Docker Build Test (push) Failing after 1m36s
CI / Backend Build (push) Successful in 2m10s
fixed the dockerfile for linting
2025-07-11 15:58:48 +02:00

31 lines
No EOL
540 B
Docker

# Build stage
FROM node:20-alpine AS build
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install all dependencies (including devDependencies for build)
RUN npm ci
# Copy source code
COPY . .
# Build the application
RUN npm run build
# Production stage
FROM nginx:alpine
# Copy built files from build stage
COPY --from=build /app/dist /usr/share/nginx/html
# Copy custom nginx configuration for SPA
COPY nginx.conf /etc/nginx/conf.d/default.conf
# Expose port
EXPOSE 80
# Start nginx
CMD ["nginx", "-g", "daemon off;"]