1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-24 14:31:44 +01:00

chore: updates docs to have base

This commit is contained in:
Amir Raminfar
2023-10-08 13:52:34 -07:00
parent 84c062c13d
commit a7f602449b
2 changed files with 50 additions and 0 deletions

View File

@@ -64,6 +64,7 @@ export default defineConfig({
text: "Advanced Configuration",
items: [
{ text: "Authentication", link: "/guide/authentication" },
{ text: "Changing Base", link: "/guide/changing-base" },
{ text: "Healthcheck", link: "/guide/healthcheck" },
{ text: "Hostname", link: "/guide/hostname" },
{ text: "Remote Hosts", link: "/guide/remote-hosts" },

View File

@@ -0,0 +1,49 @@
---
title: Changing Application Base
---
# Changing Dozzle Base
Dozzle by default mounts to "/". This can be changed with the `--base` flag. For example, if you want to mount to "/foobar" then you can use `--base foobar` or the env variable `DOZZLE_BASE`.
::: code-group
```sh
docker run --volume=/var/run/docker.sock:/var/run/docker.sock -p 8080:8080 amir20/dozzle --base foobar
```
```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_BASE: foobar
```
:::
Dozzle will be available at [http://localhost:8080/foobar/](http://localhost:8080/foobar/). This option rewrites all assets to `/foobar/{file.path}` and automatically redirects `/foobar` to `/foobar/`.
## Example with proxy
Here is an example with Nginx and proxy Dozzle with a different base:
```conf
location ^~ /foobar/ {
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app dozzle;
set $upstream_port 8080;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
}
```