57 lines
1.6 KiB
YAML
57 lines
1.6 KiB
YAML
services:
|
|
|
|
# 1. PostgreSQL 16 Datenbank (Hybrid Multi-Tenant Storage)
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: caspos-postgres
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: ${POSTGRES_DB:-caspos_reservations}
|
|
POSTGRES_USER: ${POSTGRES_USER:-caspos_admin}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-secretpassword}
|
|
ports:
|
|
- "${POSTGRES_PORT:-5432}:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
- ./docker/postgres/init:/docker-entrypoint-initdb.d
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-caspos_admin} -d ${POSTGRES_DB:-caspos_reservations}"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
# 2. Spring Boot 3 Java Backend (API)
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
container_name: caspos-backend
|
|
restart: unless-stopped
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
environment:
|
|
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/${POSTGRES_DB:-caspos_reservations}
|
|
SPRING_DATASOURCE_USERNAME: ${POSTGRES_USER:-caspos_admin}
|
|
SPRING_DATASOURCE_PASSWORD: ${POSTGRES_PASSWORD:-secretpassword}
|
|
SPRING_PROFILES_ACTIVE: docker
|
|
ports:
|
|
- "8080:8080"
|
|
|
|
# 3. TypeScript / React Frontend (Tischplan & UI)
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
dockerfile: Dockerfile
|
|
container_name: caspos-frontend
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- backend
|
|
environment:
|
|
NEXT_PUBLIC_API_URL: http://localhost:8080/api/v1
|
|
ports:
|
|
- "3000:3000"
|
|
|
|
volumes:
|
|
postgres_data:
|