Dockerfile aktualisiert
Deploy Standortpruefung / deploy (push) Failing after 8s Details

This commit is contained in:
gitea-enwelo-jba 2026-04-27 13:19:50 +00:00
parent 0828ce1ff2
commit beb60c8521
1 changed files with 7 additions and 5 deletions

View File

@ -1,4 +1,4 @@
# Nutze Node.js als Basis (LTS Version) # Nutze Node.js als Basis
FROM node:20-alpine AS build FROM node:20-alpine AS build
WORKDIR /app WORKDIR /app
@ -6,24 +6,26 @@ WORKDIR /app
COPY package*.json ./ COPY package*.json ./
RUN npm install RUN npm install
# Kopiere den restlichen Code # Kopiere den restlichen Code (Inklusive der 1,5 GB Daten!)
COPY . . COPY . .
# Baue das Frontend (erzeugt den 'dist' Ordner) # Baue das Frontend
RUN npm run build RUN npm run build
# Finales Image # Finales Image
FROM node:20-alpine FROM node:20-alpine
WORKDIR /app WORKDIR /app
# Installiere nur Production-Abhängigkeiten
COPY package*.json ./ COPY package*.json ./
RUN npm install --production RUN npm install --production
# Kopiere das gebaute Frontend und das Backend # Kopiere das gebaute Frontend und das Backend
COPY --from=build /app/dist ./dist COPY --from=build /app/dist ./dist
COPY --from=build /app/server.cjs ./ COPY --from=build /app/server.cjs ./
# Die Zeile mit /app/public wurde entfernt, da Vite dies bereits in /dist integriert hat
# JETZT WIEDER REIN: Kopiere den public Ordner (wo die großen Daten liegen)
# Wir kopieren ihn direkt aus dem build-context
COPY --from=build /app/public ./public
# Der Express-Server läuft auf Port 3000 # Der Express-Server läuft auf Port 3000
EXPOSE 3000 EXPOSE 3000