Dockerfile aktualisiert
Deploy Bürgerwind / deploy (push) Successful in 17s
Details
Deploy Bürgerwind / deploy (push) Successful in 17s
Details
This commit is contained in:
parent
0e08742f86
commit
f747634b77
11
Dockerfile
11
Dockerfile
|
|
@ -1,13 +1,16 @@
|
||||||
|
# Nutze die stabile Node.js 20 Version auf Alpine-Linux (sehr klein & sicher)
|
||||||
FROM node:20-alpine
|
FROM node:20-alpine
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Abhängigkeiten kopieren und installieren
|
# Kopiere die Paketlisten und installiere nur notwendige Produktions-Pakete
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
RUN npm install --production
|
RUN npm install --production
|
||||||
|
|
||||||
# Den restlichen Code (inkl. server.js und Frontend-Dateien) kopieren
|
# Kopiere den gesamten restlichen Programmcode in den Container
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Der Server läuft auf Port 3000
|
# Informiere Docker, dass die App auf Port 3000 hört
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
CMD ["node", "server.js"]
|
|
||||||
|
# Starte den Node.js Server
|
||||||
|
CMD ["node", "server.js"]
|
||||||
Loading…
Reference in New Issue