services: valkey: image: valkey/valkey:alpine restart: unless-stopped networks: - backend ports: - "6379:6379" deploy: resources: limits: cpus: "0.15" memory: "30MB" volumes: - redis-data:/data api1: &app # image: pedrohcorrea/rinha-backend-2025-gleam:latest build: context: . container_name: api1 networks: - backend - payment-processor restart: always environment: REDIS_CONN: valkey PROVIDERS: "http://payment-processor-default:8080,http://payment-processor-fallback:8080" PROCESSOR_TIME: 40 depends_on: - valkey deploy: resources: limits: cpus: "0.8" memory: "235MB" api2: <<: *app container_name: api2 environment: REDIS_CONN: valkey deploy: resources: limits: cpus: "0.4" memory: "75MB" nginx: image: nginx:1.29.0-alpine volumes: - $PWD/config/nginx.conf:/etc/nginx/nginx.conf:ro ports: - 9999:9999 depends_on: - api1 - api2 networks: - backend deploy: resources: limits: cpus: "0.15" memory: "10MB" volumes: redis-data: networks: backend: driver: bridge payment-processor: external: true