services: valkey: image: valkey/valkey:8-alpine command: ["valkey-server", "--save", "", "--appendonly", "no"] ports: - "6379:6379" restart: unless-stopped api: build: context: . dockerfile: Dockerfile image: lta-datamall-bus-backend:latest env_file: - .env depends_on: - valkey ports: - "${APP_PORT:-8000}:${APP_PORT:-8000}" healthcheck: test: ["CMD", "python", "-c", "import os, urllib.request; urllib.request.urlopen(f'http://localhost:{os.getenv(\"APP_PORT\", \"8000\")}/healthz', timeout=3)"] interval: 30s timeout: 5s retries: 3 start_period: 10s restart: unless-stopped