Let an installation look different via ENVIRONMENT_NAME and ENVIRONMENT_COLOR
Setting ENVIRONMENT_NAME (and optionally ENVIRONMENT_COLOR, a name or hex value) gives the sidebar that colour, adds a name badge next to the title and on the sign-in page, and prefixes the browser tab title, so a dev copy can't be taken for production. Unset, nothing changes. The colour is validated to a plain #rrggbb before it reaches the page's styles. A public GET /api/environment lets the sign-in page use it too. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
44cc9d1cf2
commit
7e196be56d
11 files changed
+253
-3
No files matched your search
@@ -425,6 +425,15 @@ docker compose up -d
|
||||
The app listens on `HOST_PORT` (default `3000`); SQLite data persists in
|
||||
`./data` on the host.
|
||||
|
||||
**Telling a dev copy from production:** set `ENVIRONMENT_NAME` (e.g. `Dev`) and
|
||||
optionally `ENVIRONMENT_COLOR` in that instance's `.env` (or under `environment:`
|
||||
in its compose file). The sidebar then takes the colour, a badge with the name
|
||||
sits next to the title and on the sign-in page, and the browser tab reads
|
||||
`[Dev] Homelab Manager`. The colour is a name (`red`, `orange`, `amber`, `green`,
|
||||
`teal`, `blue`, `purple`, `pink`, `gray`) or a hex value such as `#b45309`; a
|
||||
name alone gets orange. Leave both unset on production and nothing changes.
|
||||
Restart the container after changing them.
|
||||
|
||||
### arm64 (Raspberry Pi, Apple silicon, ARM servers)
|
||||
|
||||
Two compose files, one to build the image and one to run the published one:
|
||||
|
||||
Reference in new issue
Block a user