# Number of worker processes to spawn.
# Set to 0 to run everything in a single process without clustering.
# Use 'ncpu' to run as many workers as there are CPU units
num_workers: '{env(KARTOTHERIAN_NUM_WORKERS,ncpu)}'

# Log error messages and gracefully restart a worker if v8 reports that it
# uses more heap (note: not RSS) than this many mb.
worker_heap_limit_mb: 250

# Logger info
logging:
  level: info


# Statsd metrics reporter
metrics:
  type: debug
  host: telegraf
  port: 8125

services:
  - name: kartotherian
    module: ./app.js

    conf:
      port: 6533

      # Comment this out to allow connections from everywhere
      # interface: localhost

      # Show the the X-Powered-By header (default: true)
      expose_version: false

      sources: /etc/kartotherian/sources.yaml
      modules:
        - "@kartotherian/cassandra"
        - "@kartotherian/overzoom"

      # Secondary request handlers
      requestHandlers: []

      # Allow to reload sources when calling a disabled source
      reloadSourcesOnGetTile: true
      # Source will be disabled on unavailability
      # (eg: Cassandra error) to close obsolete connections
      disableSourceOnError: true

      # Expose leaflet UI and statics (default: true)
      exposeMapUi: false

      # Expose source 'info.json' (default: true)
      exposeSourceInfo: false

      # Catch and log statsd errors (default: false)
      catchMetricsErrors: true

# Number of worker processes to spawn.
# Set to 0 to run everything in a single process without clustering.
# Use 'ncpu' to run as many workers as there are CPU units
num_workers: '{env(KARTOTHERIAN_NUM_WORKERS,ncpu)}'

# Log error messages and gracefully restart a worker if v8 reports that it
# uses more heap (note: not RSS) than this many mb.
worker_heap_limit_mb: 250

# Logger info
logging:
  level: info


# Statsd metrics reporter
metrics:
  type: debug
  host: telegraf
  port: 8125

services:
  - name: kartotherian
    module: ./app.js

    conf:
      port: 6533
      cors: '{env(KARTOTHERIAN_CORS_ORIGIN,*)}'

      # Comment this out to allow connections from everywhere
      # interface: localhost

      # Show the the X-Powered-By header (default: true)
      expose_version: false

      sources: /etc/kartotherian/sources.yaml
      modules:
        - "@kartotherian/cassandra"
        - "@kartotherian/overzoom"

      # Secondary request handlers
      requestHandlers: []

      # Allow to reload sources when calling a disabled source
      reloadSourcesOnGetTile: true
      # Source will be disabled on unavailability
      # (eg: Cassandra error) to close obsolete connections
      disableSourceOnError: true

      # Expose leaflet UI and statics (default: true)
      exposeMapUi: false

      # Expose source 'info.json' (default: true)
      exposeSourceInfo: false

      # Catch and log statsd errors (default: false)
      catchMetricsErrors: true

Allow to override cors allowed origin with environment variable
Allow to override cors allowed origin with environment variable
