version: "3.9" services: api: build: ./backend ports: - "8000:8000" environment: - DATABASE_URL=postgresql+psycopg2://postgres:postgres@db:5432/openssecgrc - REDIS_URL=redis://redis:6379/0 - JWT_SECRET_KEY=change-me-in-production - ENCRYPTION_KEY=change-me-encryption-key-32bytes! depends_on: db: condition: service_healthy redis: condition: service_started volumes: - ./backend:/app restart: unless-stopped db: image: postgres:16-alpine environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres POSTGRES_DB: openssecgrc ports: - "5432:5432" volumes: - pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 5s timeout: 5s retries: 5 restart: unless-stopped redis: image: redis:7-alpine ports: - "6379:6379" restart: unless-stopped volumes: pgdata: