docs(guide,architecture): move internal env vars out of the operator guide
test / test (push) Has been cancelled
test / test (push) Has been cancelled
Internal (non-operator) env vars were listed in guide.md's Environment variables section even though the guide's own text says operators aren't meant to touch them. They now live in architecture.md § Configuration, the as-built/internals doc; guide.md keeps a one-line pointer. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -17,7 +17,7 @@ var documentedPublic = []string{
|
|||||||
"TRUSTED_PROXY_CIDR",
|
"TRUSTED_PROXY_CIDR",
|
||||||
}
|
}
|
||||||
|
|
||||||
// documentedInternal matches guide.md "Internal variables (not part of the operator interface)".
|
// documentedInternal matches architecture.md § Configuration "Internal env vars".
|
||||||
var documentedInternal = []string{
|
var documentedInternal = []string{
|
||||||
"SELFPOST_DATA_DIR",
|
"SELFPOST_DATA_DIR",
|
||||||
"SELFPOST_DB_PATH",
|
"SELFPOST_DB_PATH",
|
||||||
|
|||||||
+29
-1
@@ -319,5 +319,33 @@ origin check, no CSRF tokens) are documented there separately.
|
|||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
Public and internal env vars: [guide § Environment variables](guide.md#environment-variables).
|
Public env vars: [guide § Environment variables](guide.md#environment-variables).
|
||||||
Regression test: [cmd/panel/envdoc_test.go](../cmd/panel/envdoc_test.go).
|
Regression test: [cmd/panel/envdoc_test.go](../cmd/panel/envdoc_test.go).
|
||||||
|
|
||||||
|
**Internal env vars.** The following are read by the panel or startup scripts
|
||||||
|
but are not part of the operator interface — not meant to be changed in a
|
||||||
|
normal deployment; documented here so an accidental override reads as
|
||||||
|
unsupported rather than as a missing doc:
|
||||||
|
|
||||||
|
- **Panel paths and tuning:** `SELFPOST_DATA_DIR` (`/data`), `SELFPOST_DB_PATH`
|
||||||
|
(`/data/selfpost.db`), `SELFPOST_SETUP_TOKEN_FILE`
|
||||||
|
(`/data/setup-token`), `PANEL_HTTP_ADDR` (`:8080`),
|
||||||
|
`JOURNAL_MILTER_SOCKET` (`/run/selfpost/journal.sock`), `MAIL_LOG`
|
||||||
|
(`/data/log/mail.log` — read by the panel and written by Postfix, so a change
|
||||||
|
here has to be matched in `build/postfix-config.sh`),
|
||||||
|
`PANEL_COOKIE_SECURE` (`true`), `OPENDKIM_SOCKET`
|
||||||
|
(`/run/opendkim/opendkim.sock`), `OPENDKIM_DIR` (`/data/opendkim`),
|
||||||
|
`DKIM_SELECTOR_DEFAULT` (`selfpost`), `SASL_DB_PATH`
|
||||||
|
(`/data/sasl/sasldb2`), `SASL_REALM` (defaults to `SELFPOST_HOSTNAME`),
|
||||||
|
`POSTFIX_DIR` (`/data/postfix`), `POSTFIX_SENDER_LOGIN_MAPS`
|
||||||
|
(`/data/postfix/sender_login_maps` — read by Postfix config only; the panel
|
||||||
|
always writes `<POSTFIX_DIR>/sender_login_maps`, so overriding this env alone
|
||||||
|
desyncs the map Postfix reads from the file the panel maintains).
|
||||||
|
- **Milter and Postfix startup:** `MILTER_CONNECT_TIMEOUT` (`15s`),
|
||||||
|
`MILTER_COMMAND_TIMEOUT` (`15s`), `MILTER_CONTENT_TIMEOUT` (`30s`),
|
||||||
|
`MILTER_WAIT_TIMEOUT` (`30` seconds).
|
||||||
|
- **Background maintenance:** `TLS_RELOAD_INTERVAL_SECONDS` (`86400` — daily
|
||||||
|
`postfix reload` to pick up renewed certificates),
|
||||||
|
`LOGROTATE_INTERVAL_SECONDS` (`21600` — check `mail.log` rotation every six
|
||||||
|
hours; logrotate keeps 14 rotated files on a daily schedule, and each
|
||||||
|
rotation triggers `postfix reload`).
|
||||||
|
|||||||
+4
-27
@@ -196,33 +196,10 @@ TLS certificate paths (`TLS_CERT_FILE`, `TLS_KEY_FILE`) are fixed in
|
|||||||
[deploy/docker-compose.yml](../deploy/docker-compose.yml) to match the `./certs`
|
[deploy/docker-compose.yml](../deploy/docker-compose.yml) to match the `./certs`
|
||||||
bind mount — configure the mount, not these variables.
|
bind mount — configure the mount, not these variables.
|
||||||
|
|
||||||
**Internal variables (not part of the operator interface).** The following are
|
The image also reads a number of internal, non-operator env vars (paths,
|
||||||
read by the panel or startup scripts but are not meant to be changed in a
|
timeouts, tuning) — not part of this interface; see
|
||||||
normal deployment; documenting them here avoids treating accidental overrides as
|
[architecture.md § Configuration](architecture.md#configuration) if you need
|
||||||
supported configuration:
|
them.
|
||||||
|
|
||||||
- **Panel paths and tuning:** `SELFPOST_DATA_DIR` (`/data`), `SELFPOST_DB_PATH`
|
|
||||||
(`/data/selfpost.db`), `SELFPOST_SETUP_TOKEN_FILE`
|
|
||||||
(`/data/setup-token`), `PANEL_HTTP_ADDR` (`:8080`),
|
|
||||||
`JOURNAL_MILTER_SOCKET` (`/run/selfpost/journal.sock`), `MAIL_LOG`
|
|
||||||
(`/data/log/mail.log` — read by the panel and written by Postfix, so a change
|
|
||||||
here has to be matched in `build/postfix-config.sh`),
|
|
||||||
`PANEL_COOKIE_SECURE` (`true`), `OPENDKIM_SOCKET`
|
|
||||||
(`/run/opendkim/opendkim.sock`), `OPENDKIM_DIR` (`/data/opendkim`),
|
|
||||||
`DKIM_SELECTOR_DEFAULT` (`selfpost`), `SASL_DB_PATH`
|
|
||||||
(`/data/sasl/sasldb2`), `SASL_REALM` (defaults to `SELFPOST_HOSTNAME`),
|
|
||||||
`POSTFIX_DIR` (`/data/postfix`), `POSTFIX_SENDER_LOGIN_MAPS`
|
|
||||||
(`/data/postfix/sender_login_maps` — read by Postfix config only; the panel
|
|
||||||
always writes `<POSTFIX_DIR>/sender_login_maps`, so overriding this env alone
|
|
||||||
desyncs the map Postfix reads from the file the panel maintains).
|
|
||||||
- **Milter and Postfix startup:** `MILTER_CONNECT_TIMEOUT` (`15s`),
|
|
||||||
`MILTER_COMMAND_TIMEOUT` (`15s`), `MILTER_CONTENT_TIMEOUT` (`30s`),
|
|
||||||
`MILTER_WAIT_TIMEOUT` (`30` seconds).
|
|
||||||
- **Background maintenance:** `TLS_RELOAD_INTERVAL_SECONDS` (`86400` — daily
|
|
||||||
`postfix reload` to pick up renewed certificates),
|
|
||||||
`LOGROTATE_INTERVAL_SECONDS` (`21600` — check `mail.log` rotation every six
|
|
||||||
hours; logrotate keeps 14 rotated files on a daily schedule, and each
|
|
||||||
rotation triggers `postfix reload`).
|
|
||||||
|
|
||||||
### Reverse proxy (mandatory)
|
### Reverse proxy (mandatory)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user