updated .\dockerfile and .\prisma\ [deploy]
Some checks failed
Deploy Discord Bot / deploy (push) Failing after 1m44s

This commit is contained in:
Pascal Prießnitz
2025-12-03 02:56:28 +01:00
parent 4a473ffe31
commit d545053976
2 changed files with 9 additions and 22 deletions

View File

@@ -3,7 +3,7 @@ version: "3.9"
services:
app:
build:
context: . # Repo-Root mit Dockerfile & package.json
context: .
dockerfile: Dockerfile
image: papo-app:latest
working_dir: /usr/src/app
@@ -15,10 +15,6 @@ services:
depends_on:
- db
restart: unless-stopped
# WICHTIG: KEINE volumes hier!
# volumes:
# - .:/usr/src/app
# - /usr/src/app/node_modules
db:
image: postgres:15

View File

@@ -1,32 +1,23 @@
FROM node:22-bookworm
RUN apt-get update && apt-get install -y \
python3 \
make \
g++ \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /usr/src/app
# Install only needed build deps, then clean up
RUN apt-get update && apt-get install -y python3 make g++ && rm -rf /var/lib/apt/lists/*
ENV NODE_ENV=development
# Install dependencies
COPY package*.json ./
# Alle Dependencies inkl. dev installieren
RUN npm ci
# OPTIONAL, aber hilfreich: global ts-node-dev installieren,
# damit der Befehl IMMER verfügbar ist, auch wenn node_modules-mal zickt
RUN npm install -g ts-node-dev
RUN npm install
#UN npm install -g prisma
# Copy source
COPY . .
# Generate Prisma client (prisma is available from devDependencies after npm ci)
RUN npx prisma generate
# Kleine Debug-Zeile: zeigt dir im Build-Log, dass ts-node-dev im PATH ist
RUN ts-node-dev --version || echo "ts-node-dev not in PATH?!"
# Optional: show versions in build log
RUN node -v && npm -v && npx prisma -v
CMD ["npm", "run", "dev"]