Dockerfile hinzugefügt
This commit is contained in:
20
Dockerfile
Normal file
20
Dockerfile
Normal file
@ -0,0 +1,20 @@
|
||||
# Leichtes Node-Image
|
||||
FROM node:22-alpine
|
||||
|
||||
# Arbeitsverzeichnis im Container
|
||||
WORKDIR /app
|
||||
|
||||
# package.json & package-lock.json zuerst kopieren (für Docker-Cache)
|
||||
COPY package.json package-lock.json* ./
|
||||
|
||||
# Dependencies installieren
|
||||
RUN npm install --production
|
||||
|
||||
# Restlichen Code kopieren
|
||||
COPY . .
|
||||
|
||||
# Port für Express
|
||||
EXPOSE 3000
|
||||
|
||||
# Startkommando
|
||||
CMD ["node", "server.js"]
|
||||
Reference in New Issue
Block a user