# MOF v2.0.15 — Linux amd64 / ghcr
# Use the same database connection and MOF version as the main deployment.
# Private-network PostgreSQL without TLS. TLS-only databases are not supported by this release.
name: mof-worker
x-logging: &logging
  driver: json-file
  options:
    max-size: "20m"
    max-file: "5"

services:
  mof-worker:
    image: ghcr.io/mofcloud/mof:v2.0.15
    restart: unless-stopped
    logging: *logging
    environment:
      RK_POSTGRES_0_ADDR: "db.example.com:5432"
      RK_POSTGRES_0_USER: "mof"
      RK_POSTGRES_0_PASS: "REPLACE_WITH_YOUR_DATABASE_PASSWORD"
      RK_CONFIG_0_CONTENT_MODE_WORKER: "true"
      # Optional, default 2: jobs run at the same time in this process, for syncs (bills,
      # resources, exports) and ops (delete an account, purge bills, apply a virtual tag filter).
      # RK_CONFIG_0_CONTENT_JOBS_SYNCWORKERS: "2"
      # RK_CONFIG_0_CONTENT_JOBS_OPSWORKERS: "2"
    volumes:
      - offer-cache:/usr/src/mof/offer-cache

volumes:
  offer-cache:
