Configuration
SpaghettiCannon loads a YAML config file for bootstrap and connectivity. Runtime UI knobs live in the database as configuration variables (cvars), edited under Settings (/admin/settings).
Config file location
When running via Docker, config.yaml is typically in the /config directory.
The most basic config.yaml can be as simple as this:
logLevel: info
$PORT overrides listenAddress when set. Database env vars (DB_HOST, DB_USER/DB_USERNAME, DB_PASS/DB_PASSWORD, DB_NAME/DB_DATABASE) override YAML database.* after load.
YAML options
YAML values for siteTitle, showFooter, showNewVersions, and showVersionNumber are used only to seed matching cvars on first insert. After that, live values come from Settings (and Init). Title/description/category/ordinal metadata for known cvars is refreshed from application defaults on every startup; admin-chosen values are preserved.
Option |
Description |
Default |
Live Reloadable |
Notes |
|
The version of the configuration file. |
1 |
No |
--- |
|
The log level to use. |
info |
Yes |
One of |
|
HTTP bind address when |
0.0.0.0:8080 |
No |
Overridden by |
|
Initial site title seed for the |
SpaghettiCannon |
No |
Live title is the cvar after first startup. |
|
Seed for the |
true |
No |
Live value is the cvar; projected via Init. |
|
Seed for the |
true |
No |
Live value is the cvar; projected via Init. |
|
Seed for the |
true |
No |
Live value is the cvar; projected via Init. |
Database connectivity (database.host, database.user, database.pass, database.name, database.port) is YAML-only bootstrap. sql-migrate expects DB_HOST, DB_USER, DB_PASS, and DB_NAME (entrypoint maps DB_DATABASE / DB_USERNAME / DB_PASSWORD when set). See Database migrations.
The expected migration id is a compile-time constant (config.RequiredMigration), not a config setting.
Settings (cvars)
Missing defaults are inserted on startup. Saving a Settings section reloads Init so the SPA picks up changes without a process restart.
Key |
Type |
Default |
Effect |
|
string |
from |
Header and browser tab title |
|
bool |
from |
Show the page footer |
|
bool |
from |
Footer update hint when a newer build exists |
|
bool |
from |
Show installed version in the footer |