Dicken Dock v1.0.0
This commit is contained in:
18
Dockerfile
Normal file
18
Dockerfile
Normal file
@@ -0,0 +1,18 @@
|
||||
# ── Stage 1: React bauen ─────────────────────────────────────────────────────
|
||||
FROM node:20-alpine AS builder
|
||||
WORKDIR /build
|
||||
COPY frontend/package.json ./
|
||||
RUN npm install
|
||||
COPY frontend/ ./
|
||||
RUN npm run build
|
||||
|
||||
# ── Stage 2: Express liefert API + React in einem Container ──────────────────
|
||||
FROM node:20-alpine
|
||||
WORKDIR /app
|
||||
COPY backend/package.json ./
|
||||
RUN npm install --production
|
||||
COPY backend/ ./
|
||||
COPY version.txt ./version.txt
|
||||
COPY --from=builder /build/dist ./public
|
||||
EXPOSE 4000
|
||||
CMD ["node", "src/index.js"]
|
||||
Reference in New Issue
Block a user