ALMS loads configuration in this order:
- defaults compiled into the binary
- explicit
-configpath if provided - first existing file in:
~/.alms/alms.yaml/etc/alms/alms.yaml/opt/alms/alms.yaml
- environment variable overrides
Example:
server:
host: "0.0.0.0"
port: 8001
database:
dsn: "postgres://alms:alms@localhost:5432/alms_db?sslmode=disable"
auth:
token: "change-me"ALMS_PG_DSN: overridesdatabase.dsnALMS_AUTH_TOKEN: overridesauth.token
- host:
127.0.0.1 - port:
8001 - DSN:
postgres://alms:alms@localhost:5432/alms_db?sslmode=disable - auth token: empty
-config: load a specific config file-migrate: print migration guidance and exit-version: print version and commit and exit
- keep credentials in environment variables or a secret store
- bind ALMS behind a reverse proxy if exposing it beyond localhost
- terminate TLS at the proxy or ingress layer
- do not rely on the empty-token default outside local development