From 9b2cf1254ec838f5eb8eff6feda187f1a3f25ece Mon Sep 17 00:00:00 2001 From: Amir Raminfar Date: Thu, 5 Oct 2023 13:50:30 -0700 Subject: [PATCH] chore(docs): adds docs for hostname label --- docs/.vitepress/config.ts | 1 + docs/guide/hostname.md | 30 ++++++++++++++++++++++++++++++ docs/guide/remote-hosts.md | 4 ++++ 3 files changed, 35 insertions(+) create mode 100644 docs/guide/hostname.md diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 98a54c74..e4d22923 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -65,6 +65,7 @@ export default defineConfig({ items: [ { text: "Authentication", link: "/guide/authentication" }, { text: "Healthcheck", link: "/guide/healthcheck" }, + { text: "Hostname", link: "/guide/hostname" }, { text: "Remote Hosts", link: "/guide/remote-hosts" }, { text: "Supported Env Vars", link: "/guide/supported-env-vars" }, { text: "Logging Files on Disk", link: "/guide/log-files-on-disk" }, diff --git a/docs/guide/hostname.md b/docs/guide/hostname.md new file mode 100644 index 00000000..46810700 --- /dev/null +++ b/docs/guide/hostname.md @@ -0,0 +1,30 @@ +--- +title: Hostname +--- + +# Changing Dozzle's Hostname + +Dozzle's default connection is called localhost. Using `--hostname` flag Dozzle's name can be changed to anything. This value be will shown on the page title and under the Dozzle logo. + +Changing the label for localhost also changes the label for the `localhost` connection which is displayed under the multi-host menu. Below is an example of using `--hostname` to change the name of Dozzle's subheader to `mywebsite.xyz`. + +::: code-group + +```sh +docker run --volume=/var/run/docker.sock:/var/run/docker.sock -p 8080:8080 amir20/dozzle --hostname mywebsite.xyz +``` + +```yaml [docker-compose.yml] +version: "3" +services: + dozzle: + image: amir20/dozzle:latest + volumes: + - /var/run/docker.sock:/var/run/docker.sock + ports: + - 8080:8080 + environment: + DOZZLE_HOSTNAME: mywebsite.xyz +``` + +::: diff --git a/docs/guide/remote-hosts.md b/docs/guide/remote-hosts.md index c3a100c2..6be5f3e0 100644 --- a/docs/guide/remote-hosts.md +++ b/docs/guide/remote-hosts.md @@ -79,3 +79,7 @@ services: ``` ::: + +## Changing localhost label + +`localhost` is a special connection and uses different configuration than `--remote-host`. Changing the label for localhost can be done using the `--hostname` or `DOZZLE_HOSTNAME` env variable. See [hostname](/guide/hostname) page for examples on how to use this flag.