Added Running Config
This commit is contained in:
20
Dockerfile
Normal file
20
Dockerfile
Normal file
@@ -0,0 +1,20 @@
|
||||
# Basis-Image mit Node.js
|
||||
FROM node:20-alpine
|
||||
|
||||
# Arbeitsverzeichnis im Container
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# package.json und package-lock.json zuerst kopieren
|
||||
COPY package*.json ./
|
||||
|
||||
# Dependencies installieren (nur Produktion, falls nötig)
|
||||
RUN npm install --omit=dev
|
||||
|
||||
# Restlichen Quellcode kopieren
|
||||
COPY . .
|
||||
|
||||
# Port setzen (Fastify läuft standardmäßig auf 3000)
|
||||
EXPOSE 3000
|
||||
|
||||
# Startkommando
|
||||
CMD ["npm", "start"]
|
||||
Reference in New Issue
Block a user