services: db: image: postgres:16-alpine ports: - "5432:5432" environment: POSTGRES_DB: user_system POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres volumes: - pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 5s timeout: 5s retries: 5 api: build: . ports: - "8080:8080" depends_on: db: condition: service_healthy env_file: .env.local environment: DATABASE_URL: postgresql://postgres:postgres@db:5432/user_system PORT: "8080" volumes: pgdata: