# The largest download the service accepts, in bytes: one value for the app # and for clamd's own caps, which must not be below it — a stream above # StreamMaxLength dies mid-INSTREAM, a file above MaxFileSize / MaxScanSize # is skipped and reported clean. Override it with MAX_URL_SIZE in .env or # the shell (not app.local: this setting wins over env_file). The default is # the most libclamav scans in one file (INT_MAX - 2); the app refuses to # start above it while clamav scans. x-max-url-size: &max_url_size ${MAX_URL_SIZE:-2147483645} services: app: build: context: . target: runtime-dev volumes: - ./:/app ports: - 8090:8090 depends_on: clamav: condition: service_healthy redis: condition: service_started # Dev config lives in deploy/env/ (Messages convention): committed # app.defaults + gitignored app.local overrides (`make create-env-files`). env_file: - deploy/env/app.defaults - deploy/env/app.local environment: MAX_URL_SIZE: *max_url_size worker: build: context: . target: runtime-dev command: python -m worker volumes: - ./:/app depends_on: clamav: condition: service_healthy redis: condition: service_started env_file: - deploy/env/app.defaults - deploy/env/app.local ports: - 9191:9191 # worker metrics (WORKER_METRICS_PORT) environment: MAX_URL_SIZE: *max_url_size # Auto-reload the worker on code changes in dev. WORKER_WATCH: /app/src # Pings the worker through Redis and back (see src/health.py). Compose # only marks the container unhealthy, it does not restart it. healthcheck: test: ["CMD", "python", "-m", "health"] interval: 30s timeout: 10s retries: 3 start_period: 15s clamav: image: clamav/clamav:1.4 # clamav publishes amd64 only; pin it so arm64 dev hosts run it emulated # (no-op on amd64 CI). Needs QEMU: `docker run --privileged --rm tonistiigi/binfmt --install amd64`. platform: linux/amd64 ports: - 3310:3310 # clamd's caps follow MAX_URL_SIZE (see the top of this file); a bare # number is bytes to clamd.conf, which the image builds from # CLAMD_CONF_