Galia Guide 1.0

Configuration

Galia's configuration is a flat list of key-value pairs. When the application searches for a value for a given key, it looks in the following places in order of priority:

  1. The environment.
  2. The configuration file.

Both are read-only and cannot be modified by the application.

Environment configuration

Key names in the environment are uppercased versions of the key names in the configuration file, prefixed with GALIA_, and with all non-alphanumerics replaced with underscores. For example, the following key-value pair in the configuration file:

endpoint.iiif.3.enabled: true

Would be set in the environment as:

GALIA_ENDPOINT_IIIF_3_ENABLED=true

File configuration

Configuration files are encoded in YAML format. The configuration file included in the distribution archive, config/config.yml, contains an authoritative listing of all available keys set to reasonable default values.

A dedicated application thread constantly watches the configuration file and automatically reloads it when it detects a change. Changes to most keys take effect immediately, but some require a restart; see the inline comments for documentation of which.

When upgrading the application, the Migration Guide will usually list any keys that have been added, removed, or changed—and you will need to manually make these changes in your configuration file. The bin/configtest.sh script can help with this, listing any keys that are missing from the file, or are recognized neither by the application nor any plugins.

Remote changes

The live configuration can be updated remotely via the HTTP API. When a change is received, it will be activated immediately, but it will not be persisted, as neither the configuration file nor the environment are writable.