updated .\dockerfile[deploy]
All checks were successful
Deploy Discord Bot / deploy (push) Successful in 2m41s
All checks were successful
Deploy Discord Bot / deploy (push) Successful in 2m41s
This commit is contained in:
20
dockerfile
20
dockerfile
@@ -1,21 +1,27 @@
|
||||
# Nutze Node 18 wie bisher
|
||||
FROM node:18-alpine
|
||||
# Node 22 auf Debian-Basis (glibc, nicht alpine/musl)
|
||||
FROM node:22-bookworm
|
||||
|
||||
# System-Pakete für native Module (@discordjs/opus, node-gyp, etc.)
|
||||
RUN apt-get update && apt-get install -y \
|
||||
python3 \
|
||||
make \
|
||||
g++ \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Arbeitsverzeichnis
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# package.json und lockfile zuerst kopieren (für besseres Caching)
|
||||
# package.json & lockfile zuerst kopieren (für Caching)
|
||||
COPY package*.json ./
|
||||
|
||||
# Dependencies installieren (für Prod ggf. ohne devDependencies)
|
||||
# Dependencies installieren (Prod ohne devDependencies, wenn du das willst)
|
||||
RUN npm ci --omit=dev
|
||||
|
||||
# Restlichen Code kopieren
|
||||
COPY . .
|
||||
|
||||
# Wenn du TypeScript o.ä. builden musst, hier:
|
||||
# Wenn du TypeScript oder ein Build-Skript hast:
|
||||
# RUN npm run build
|
||||
|
||||
# Start-Kommando – anpassen, je nachdem was du hast
|
||||
# z.B. "start" oder "dev"
|
||||
# Startkommando – bei dir scheinst du dev zu nutzen
|
||||
CMD ["npm", "run", "dev"]
|
||||
|
||||
Reference in New Issue
Block a user