This commit is contained in:
21
dockerfile
Normal file
21
dockerfile
Normal file
@@ -0,0 +1,21 @@
|
||||
# Nutze Node 18 wie bisher
|
||||
FROM node:18-alpine
|
||||
|
||||
# Arbeitsverzeichnis
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# package.json und lockfile zuerst kopieren (für besseres Caching)
|
||||
COPY package*.json ./
|
||||
|
||||
# Dependencies installieren (für Prod ggf. ohne devDependencies)
|
||||
RUN npm ci --omit=dev
|
||||
|
||||
# Restlichen Code kopieren
|
||||
COPY . .
|
||||
|
||||
# Wenn du TypeScript o.ä. builden musst, hier:
|
||||
# RUN npm run build
|
||||
|
||||
# Start-Kommando – anpassen, je nachdem was du hast
|
||||
# z.B. "start" oder "dev"
|
||||
CMD ["npm", "run", "dev"]
|
||||
Reference in New Issue
Block a user