This commit is contained in:
2026-04-10 16:55:38 -05:00
parent 3e9ca1a146
commit 2d3b97864e
12 changed files with 10 additions and 238 deletions

View File

@@ -1,53 +1,16 @@
version: "3.9"
services:
db:
image: postgres:16-alpine
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
POSTGRES_DB: ${POSTGRES_DB:-cielectrical}
ports:
- "5432:5432"
volumes:
- db_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-cielectrical}"]
interval: 10s
timeout: 5s
retries: 5
api:
build: ./api
environment:
NODE_ENV: production
DATABASE_URL: postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:5432/${POSTGRES_DB:-cielectrical}?schema=public
PORT: 4000
depends_on:
db:
condition: service_healthy
ports:
- "4000:4000"
restart: unless-stopped
healthcheck:
test: ["CMD", "node", "-e", "fetch('http://localhost:4000/health').then(()=>process.exit(0)).catch(()=>process.exit(1))"]
interval: 15s
timeout: 5s
retries: 5
web:
cielectrical-web:
build: ./web
container_name: cielectrical-web
restart: unless-stopped
environment:
NODE_ENV: production
NEXT_TELEMETRY_DISABLED: "1"
API_BASE_URL: http://api:4000
NEXT_PUBLIC_SITE_URL: http://localhost:3000
depends_on:
api:
condition: service_healthy
ports:
- "3000:3000"
restart: unless-stopped
NEXT_PUBLIC_SITE_URL: https://ci-electrical.com
# API_BASE_URL wurde entfernt, da das Backend wegfällt
networks:
- bizmatch
volumes:
db_data:
networks:
bizmatch:
external: true