Compare commits
2 Commits
f10c71c9ec
...
f6574bc970
| Author | SHA1 | Date | |
|---|---|---|---|
| f6574bc970 | |||
| 1495c934ef |
10
frontend/.dockerignore
Normal file
10
frontend/.dockerignore
Normal file
@ -0,0 +1,10 @@
|
||||
node_modules
|
||||
dist
|
||||
build
|
||||
.cache
|
||||
.git
|
||||
.gitignore
|
||||
.env
|
||||
.env.*
|
||||
coverage
|
||||
npm-debug.log*
|
||||
@ -1,31 +1,23 @@
|
||||
# Build stage
|
||||
FROM node:18-alpine AS builder
|
||||
|
||||
# ---- Build stage ----
|
||||
FROM node:20-bookworm-slim AS builder
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package files
|
||||
COPY package*.json ./
|
||||
# nur Manifeste kopieren
|
||||
COPY package.json package-lock.json ./
|
||||
|
||||
# Install dependencies
|
||||
RUN npm ci
|
||||
# npm robuster machen (optional, aber hilft)
|
||||
RUN npm i -g npm@9
|
||||
RUN npm ci --no-audit --no-fund
|
||||
|
||||
# Copy source code
|
||||
# restlichen Code kopieren (ohne node_modules dank .dockerignore)
|
||||
COPY . .
|
||||
|
||||
# Build the application
|
||||
# Build
|
||||
RUN npm run build
|
||||
|
||||
# Production stage
|
||||
# ---- Runtime ----
|
||||
FROM nginx:alpine
|
||||
|
||||
# Copy built assets from builder stage
|
||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||
|
||||
# Copy nginx configuration
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
# Expose port 80
|
||||
EXPOSE 80
|
||||
|
||||
# Start nginx
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
CMD ["nginx","-g","daemon off;"]
|
||||
|
||||
9426
frontend/package-lock.json
generated
9426
frontend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user