version: '3.8' services: postgres: image: postgres:17-alpine container_name: collabtable-postgres restart: unless-stopped environment: - POSTGRES_DB=collabtable - POSTGRES_USER=collabtable - POSTGRES_PASSWORD=collabtable volumes: - pg_data:/var/lib/postgresql/data networks: - collabtable-network healthcheck: test: ["CMD-SHELL", "pg_isready -U collabtable"] interval: 10s timeout: 5s retries: 5 server: build: . container_name: collabtable-server restart: unless-stopped environment: - PORT=3000 - NODE_ENV=production # Session cookie for the admin web dashboard (see src/routes/authRoutes.ts) - COOKIE_SECURE=false # Retry DB initialization instead of crashing immediately on startup races - DB_INIT_RETRY_INTERVAL_MS=5000 - DB_INIT_RETRY_MAX_ATTEMPTS=0 # Clamp future client timestamps during sync to avoid resend loops - SYNC_MAX_FUTURE_SKEW_MS=0 - DATABASE_URL=postgres://collabtable:collabtable@postgres:5432/collabtable ports: - "3000:3000" depends_on: postgres: condition: service_healthy networks: - collabtable-network volumes: pg_data: networks: collabtable-network: driver: bridge