Configuration
Every switch a deployment reads from its environment, and what it does. A site process, its
supervisor, the node agent and the CLI's dev server read different variables, so they are listed
apart: setting a supervisor variable in a site's .env changes nothing.
Nothing here is a secret value. A connection string, a JWT secret and an administrator password belong in the environment or in a mode-600 file that never enters git.
The site process
The engine and, in the embedded shape, the admin API.
| Variable | Meaning |
|---|---|
PORT |
The port the site's HTTP server listens on |
NODE_ENV |
production selects production behaviour — the content-index repair pass, for one, runs by default only there |
SITE_PATH |
The site's directory. The file manager keeps its folders and files below it, and the paths it reports are relative to it |
SNOLLA_DB_DRIVER |
The database driver of the site's own process (pg unless a deployment says otherwise) |
SNOLLA_DB_DSN |
The site's database connection string. DATABASE_URL is accepted as the same thing |
SNOLLA_DB_DIALECT |
postgres, mariadb, mssql or sqlite — it selects the DDL and the upsert syntax, so it is never guessed |
SNOLLA_SEARCH_DRAINER |
off keeps the search rebuild loop from starting in this process. Any other value (or none) starts it when a database is configured — see Indexing and search |
SNOLLA_ADMIN_EMAIL |
The first administrator's address, for provisioning |
SNOLLA_ADMIN_PASSWORD |
That administrator's password. It is read from the environment and never passed on a command line |
The supervisor
A deployment that runs a site and its admin API as supervised processes (deploy/node) reads these.
Its shape is a deployment decision: SNOLLA_ADMIN picks it.
| Variable | Meaning |
|---|---|
SNOLLA_ADMIN |
embed (the default) mounts the admin API inside the engine's own process, process runs it as a second supervised process, off runs no admin at all |
SNOLLA_ENGINE_ENTRY |
The engine's entry file, relative to the site directory. Left unset, server.js is used when it exists and index.js otherwise |
SNOLLA_ADMIN_ENTRY |
The admin API's entry file, relative to the site directory |
SNOLLA_ADMIN_PORT |
The admin API's port, 4731 by default. It stays inside the container |
SNOLLA_SUPERVISOR_MAX_RESTARTS |
How many times a process is restarted before the supervisor gives up, 5 by default. 0 is a real answer: fail on the first death |
SNOLLA_SUPERVISOR_STABLE_MS |
How long a restarted process must stay alive before its restart count is forgiven, one minute by default |
SNOLLA_DB_PROBE_TIMEOUT_MS |
How long the supervisor waits for the database to answer before calling it down, five seconds by default |
The node agent
The agent that makes a node match the deployment's record reads these. Three of them are required: an agent that guesses which node it is, or which compose service it scales, would scale the wrong thing on somebody's box.
| Variable | Meaning |
|---|---|
SNOLLA_NODE |
Required. The node this agent reconciles |
FLEET_SERVICE |
Required. The compose service that runs the node — not the agent's own service, which is refused on purpose |
SNOLLA_DB_DSN / DATABASE_URL |
Required. Where the desired facts live |
SNOLLA_DB_DIALECT |
Required. Same values as the site process |
FLEET_PROJECT |
The compose project the node's containers carry. COMPOSE_PROJECT_NAME wins when both are set, because that is what the compose invocation actually uses |
FLEET_COMPOSE_FILE |
The compose file the agent drives, when it is not the one in its own directory |
AGENT_APPLY |
1 applies the plan. Without it the agent only reports |
AGENT_ONCE |
1 runs one pass and exits, instead of looping |
AGENT_INTERVAL_MS |
The pause between passes, one minute by default. Values under a second are refused as a spin loop |
AGENT_IMAGE_PREFIX |
The only registry prefix an image from the deployment's record may name — a row is a lower trust boundary than the socket the agent drives |
The CLI's dev server and tooling
| Variable | Meaning |
|---|---|
NODE_CONFIG |
Extra configuration for snolla dev, as JSON. The dev server sets a placeholder image proxy here so a site without one still renders |
SUPPRESS_NO_CONFIG_WARNING |
Silences the configuration library's "no config directory" warning — the dev server sets it |
ADMIN_API_ENDPOINT |
The installation an admin client generator asks, when --endpoint is not given |
ADMIN_API_TOKEN |
The credential that generator sends, when --token is not given |
JWT_SECRET |
The secret the admin interface signs its own session cookies with |
Command flags that have no home elsewhere
| Flag | Command | Meaning |
|---|---|---|
--previous <dir> |
snolla site export |
A bundle of the same site to compare against: a table that had rows there and has none now is refused |
--storage-base <path> |
asset steps of site, tenant and assets |
The local storage root, when the engine's own configuration is not what should be read |
--assets-dir <path> |
asset steps | Where the asset bundle lives, when it is not inside the site bundle |
Related
- CLI reference — every command and its flags in one page.
- Sites and nodes on a deployment — provisioning, listing and reconciling.
- Indexing and search — the loop
SNOLLA_SEARCH_DRAINERstarts.