1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-21 13:23:07 +01:00

chore: cleans up docs for env vars

This commit is contained in:
Amir Raminfar
2024-01-02 14:08:31 -08:00
parent bcb3c326e8
commit f43f4d4ee4
2 changed files with 21 additions and 31 deletions

View File

@@ -6,18 +6,18 @@ title: Environment variables and configuration
Configurations can be done with flags or environment variables. The table below outlines all supported options and their respective env vars. Configurations can be done with flags or environment variables. The table below outlines all supported options and their respective env vars.
| Flag | Env Variable | Default | | Flag | Env Variable | Default |
| ------------------ | ----------------------- | ------- | | --------------------------- | -------------------------------- | -------------- |
| `--addr` | `DOZZLE_ADDR` | `:8080` | | `--addr` | `DOZZLE_ADDR` | `:8080` |
| `--auth-provider` | `DOZZLE_AUTH_PROVIDER` | false | | `--base` | `DOZZLE_BASE` | `/` |
| `--base` | `DOZZLE_BASE` | `/` | | `--hostname` | `DOZZLE_HOSTNAME` | `""` |
| `--enable-actions` | `DOZZLE_ENABLE_ACTIONS` | false | | `--level` | `DOZZLE_LEVEL` | `info` |
| `--filter` | `DOZZLE_FILTER` | `""` | | `--auth-provider` | `DOZZLE_AUTH_PROVIDER` | false |
| `--hostname` | `DOZZLE_HOSTNAME` | `""` | | `--auth-header-user` | `DOZZLE_AUTH_HEADER_USER` | `Remote-User` |
| `--level` | `DOZZLE_LEVEL` | `info` | | `--auth-header-email` | `DOZZLE_AUTH_HEADER_EMAIL` | `Remote-Email` |
| `--no-analytics` | `DOZZLE_NO_ANALYTICS` | false | | `--auth-header-name` | `DOZZLE_AUTH_HEADER_NAME` | `Remote-Name` |
| `--password` | `DOZZLE_PASSWORD` | `""` | | `--enable-actions` | `DOZZLE_ENABLE_ACTIONS` | false |
| `--passwordfile` | `DOZZLE_PASSWORD_FILE` | `""` | | `--wait-for-docker-seconds` | `DOZZLE_WAIT_FOR_DOCKER_SECONDS` | 0 |
| `--remote-host` | `DOZZLE_REMOTE_HOST` | `""` | | `--filter` | `DOZZLE_FILTER` | `""` |
| `--username` | `DOZZLE_USERNAME` | `""` | | `--no-analytics` | `DOZZLE_NO_ANALYTICS` | false |
| `--usernamefile` | `DOZZLE_USERNAME_FILE` | `""` | | `--remote-host` | `DOZZLE_REMOTE_HOST` | |

22
main.go
View File

@@ -27,16 +27,6 @@ var (
version = "head" version = "head"
) )
type DockerSecret struct {
Value string
}
func (s *DockerSecret) UnmarshalText(b []byte) error {
v, err := os.ReadFile(string(b))
s.Value = strings.Trim(string(v), "\r\n")
return err
}
type args struct { type args struct {
Addr string `arg:"env:DOZZLE_ADDR" default:":8080" help:"sets host:port to bind for server. This is rarely needed inside a docker container."` Addr string `arg:"env:DOZZLE_ADDR" default:":8080" help:"sets host:port to bind for server. This is rarely needed inside a docker container."`
Base string `arg:"env:DOZZLE_BASE" default:"/" help:"sets the base for http router."` Base string `arg:"env:DOZZLE_BASE" default:"/" help:"sets the base for http router."`
@@ -44,17 +34,17 @@ type args struct {
Level string `arg:"env:DOZZLE_LEVEL" default:"info" help:"set Dozzle log level. Use debug for more logging."` Level string `arg:"env:DOZZLE_LEVEL" default:"info" help:"set Dozzle log level. Use debug for more logging."`
Username string `arg:"env:DOZZLE_USERNAME" help:"sets the username for auth."` Username string `arg:"env:DOZZLE_USERNAME" help:"sets the username for auth."`
Password string `arg:"env:DOZZLE_PASSWORD" help:"sets password for auth"` Password string `arg:"env:DOZZLE_PASSWORD" help:"sets password for auth"`
AuthHeaderUser string `arg:"env:DOZZLE_AUTH_HEADER_USER" default:"Remote-User" help:"sets the HTTP Header to use for username in Forward Proxy configuration."` AuthProvider string `arg:"--auth-provider,env:DOZZLE_AUTH_PROVIDER" default:"none" help:"sets the auth provider to use. Currently only forward-proxy is supported."`
AuthHeaderEmail string `arg:"env:DOZZLE_AUTH_HEADER_EMAIL" default:"Remote-Email" help:"sets the HTTP Header to use for email in Forward Proxy configuration."` AuthHeaderUser string `arg:"--auth-header-user,env:DOZZLE_AUTH_HEADER_USER" default:"Remote-User" help:"sets the HTTP Header to use for username in Forward Proxy configuration."`
AuthHeaderName string `arg:"env:DOZZLE_AUTH_HEADER_NAME" default:"Remote-Name" help:"sets the HTTP Header to use for name in Forward Proxy configuration."` AuthHeaderEmail string `arg:"--auth-header-email,env:DOZZLE_AUTH_HEADER_EMAIL" default:"Remote-Email" help:"sets the HTTP Header to use for email in Forward Proxy configuration."`
NoAnalytics bool `arg:"--no-analytics,env:DOZZLE_NO_ANALYTICS" help:"disables anonymous analytics"` AuthHeaderName string `arg:"--auth-header-name,env:DOZZLE_AUTH_HEADER_NAME" default:"Remote-Name" help:"sets the HTTP Header to use for name in Forward Proxy configuration."`
WaitForDockerSeconds int `arg:"--wait-for-docker-seconds,env:DOZZLE_WAIT_FOR_DOCKER_SECONDS" help:"wait for docker to be available for at most this many seconds before starting the server."` WaitForDockerSeconds int `arg:"--wait-for-docker-seconds,env:DOZZLE_WAIT_FOR_DOCKER_SECONDS" help:"wait for docker to be available for at most this many seconds before starting the server."`
EnableActions bool `arg:"--enable-actions,env:DOZZLE_ENABLE_ACTIONS" default:"false" help:"enables essential actions on containers from the web interface."`
FilterStrings []string `arg:"env:DOZZLE_FILTER,--filter,separate" help:"filters docker containers using Docker syntax."` FilterStrings []string `arg:"env:DOZZLE_FILTER,--filter,separate" help:"filters docker containers using Docker syntax."`
Filter map[string][]string `arg:"-"` Filter map[string][]string `arg:"-"`
Healthcheck *HealthcheckCmd `arg:"subcommand:healthcheck" help:"checks if the server is running."` Healthcheck *HealthcheckCmd `arg:"subcommand:healthcheck" help:"checks if the server is running."`
RemoteHost []string `arg:"env:DOZZLE_REMOTE_HOST,--remote-host,separate" help:"list of hosts to connect remotely"` RemoteHost []string `arg:"env:DOZZLE_REMOTE_HOST,--remote-host,separate" help:"list of hosts to connect remotely"`
AuthProvider string `arg:"--auth-provider,env:DOZZLE_AUTH_PROVIDER" default:"none" help:"sets the auth provider to use. Currently only forward-proxy is supported."` NoAnalytics bool `arg:"--no-analytics,env:DOZZLE_NO_ANALYTICS" help:"disables anonymous analytics"`
EnableActions bool `arg:"--enable-actions,env:DOZZLE_ENABLE_ACTIONS" default:"false" help:"enables essential actions on containers from the web interface."`
} }
type HealthcheckCmd struct { type HealthcheckCmd struct {