services: app: build: . ports: - "${APP_PORT:-8000}:8000" depends_on: database: condition: service_healthy environment: - APP_NAME=${APP_NAME:-My App} - DATABASE_URL=postgresql://${POSTGRES_USER:-app}:${POSTGRES_PASSWORD:-app}@database:5432/${POSTGRES_DB:-app} - DRUPPIE_URL=${DRUPPIE_URL:-http://druppie-backend:8000} - DRUPPIE_MODULE_API_TOKEN=${DRUPPIE_MODULE_API_TOKEN:-} - DEBUG=${DEBUG:-false} healthcheck: test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"] interval: 10s timeout: 5s retries: 5 start_period: 10s database: image: pgvector/pgvector:pg16 environment: POSTGRES_USER: ${POSTGRES_USER:-app} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-app} POSTGRES_DB: ${POSTGRES_DB:-app} volumes: - pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-app}"] interval: 5s timeout: 3s retries: 5 volumes: pgdata: