feat: SPA build + serving im Dockerfile und server.ts
Some checks failed
Deploy Discord Bot / deploy (push) Has been cancelled

This commit is contained in:
Pepe44DEV
2026-07-01 04:14:27 +02:00
parent 40af301188
commit 0d3f0c5ae4
2 changed files with 75 additions and 37 deletions

View File

@@ -12,20 +12,30 @@ ENV PATH="/usr/src/app/node_modules/.bin:${PATH}"
ENV DATABASE_URL=postgresql://user:pass@localhost:5432/papo?schema=public
ENV PRISMA_IGNORE_ENV_LOAD=true
# Install dependencies (inkl. dev)
# Install backend dependencies
COPY package*.json ./
RUN npm ci --include=dev
# Ensure prisma CLI available globally (avoids path issues)
RUN npm install -g prisma@5.4.2
# Install frontend dependencies
COPY frontend/package*.json ./frontend/
RUN npm --prefix frontend ci
# Copy source
COPY . .
# Build frontend
RUN npm run build:web
# Ensure prisma CLI available globally (avoids path issues)
RUN npm install -g prisma@5.4.2
# Generate Prisma client (explicit schema path)
RUN prisma generate --schema=src/database/schema.prisma
# Build backend
RUN npm run build
# Optional: show versions in build log
RUN node -v && npm -v && npx prisma -v
CMD ["npm", "run", "dev"]
CMD ["npm", "start"]