services: api: build: . environment: WA_ENVIRONMENT: local-compose WA_INVENTORY_BACKEND: redis WA_REDIS_URL: redis://redis:6379/0 WA_INVENTORY_ADMIN_TOKEN: local-development-token ports: - "8080:8080" depends_on: redis: condition: service_healthy healthcheck: test: - CMD - python - -c - "import urllib.request; urllib.request.urlopen('http://localhost:8080/health/ready', timeout=1)" interval: 5s timeout: 2s retries: 10 start_period: 5s read_only: true tmpfs: - /tmp security_opt: - no-new-privileges:true redis: image: redis:7.4-alpine command: ["redis-server", "--appendonly", "yes", "--maxmemory-policy", "noeviction"] volumes: - redis-data:/data healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 3s timeout: 2s retries: 10 volumes: redis-data: