services: db: image: postgres:17-alpine environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres POSTGRES_DB: vehicle_positions ports: - "5432:5432" volumes: - pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 5s timeout: 5s retries: 5 server: build: . ports: - "8080:8080" environment: PORT: "8080" DATABASE_URL: "postgres://postgres:postgres@db:5432/vehicle_positions?sslmode=disable" STALENESS_THRESHOLD: "5m" depends_on: db: condition: service_healthy volumes: pgdata: