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

View File

@@ -1,32 +1,23 @@
FROM node:22-bookworm 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 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 ENV NODE_ENV=development
# Install dependencies
COPY package*.json ./ COPY package*.json ./
# Alle Dependencies inkl. dev installieren
RUN npm ci RUN npm ci
# OPTIONAL, aber hilfreich: global ts-node-dev installieren, # Copy source
# 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 . . COPY . .
# Generate Prisma client (prisma is available from devDependencies after npm ci)
RUN npx prisma generate RUN npx prisma generate
# Kleine Debug-Zeile: zeigt dir im Build-Log, dass ts-node-dev im PATH ist # Optional: show versions in build log
RUN ts-node-dev --version || echo "ts-node-dev not in PATH?!" RUN node -v && npm -v && npx prisma -v
CMD ["npm", "run", "dev"] CMD ["npm", "run", "dev"]