services: cage-postgres: image: postgres:17-alpine container_name: cage-postgres ports: - 5432:5432 environment: - POSTGRES_USER=cage - POSTGRES_PASSWORD=cage - POSTGRES_DB=cage volumes: - cage-postgres:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U cage -d cage"] interval: 5s timeout: 5s retries: 5 cage-app: build: . container_name: cage-app ports: - "8080:8080" env_file: - .env.docker volumes: - /var/run/docker.sock:/var/run/docker.sock depends_on: cage-postgres: condition: service_healthy cage-redis: image: redis:7-alpine container_name: cage-redis ports: - "6379:6379" volumes: - cage-redis:/data healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 5s retries: 5 volumes: cage-postgres: cage-redis: