This commit is contained in:
Andreas Knuth 2025-07-27 15:48:30 -05:00
parent d550342492
commit 55959ce22d
1 changed files with 32 additions and 21 deletions

View File

@ -1,13 +1,24 @@
version: '3.8'
services:
backend:
build: ../../bizmatch-project/bizmatch-server # Dockerfile für NestJS
app:
image: node:22-alpine
working_dir: /app
volumes:
- ~/git/bizmatch-project/bizmatch-server:/app
ports:
- "3000:3000" # Für lokale Entwicklung
env_file: .env # Gemeinsame Umgebungsvariablen
- "3000:3000"
environment:
- DATABASE_URL=${DATABASE_URL}
- FIREBASE_PROJECT_ID=${FIREBASE_PROJECT_ID}
- FIREBASE_PRIVATE_KEY=${FIREBASE_PRIVATE_KEY}
- NODE_ENV=production
- DB_HOST=postgres
- DB_PORT=5432
- DB_NAME=${POSTGRES_DB}
- DB_USER=${POSTGRES_USER}
- DB_PASSWORD=${POSTGRES_PASSWORD}
command: sh -c "npm install && npm run build --omit=dev && node dist/src/main.js"
restart: unless-stopped
depends_on:
- postgres
networks:
- bizmatch
@ -28,4 +39,4 @@ services:
networks:
bizmatch:
external: true # Externes Netzwerk, um mit Caddy zu kommunizieren
external: true