Skip to content

Commit

Permalink
adding a Caddy example to the TROUBLESHOOTING_REVERSE_PROXY.md guide
Browse files Browse the repository at this point in the history
fixes #257
  • Loading branch information
AnalogJ committed May 27, 2022
1 parent b6e6902 commit fe80bed
Showing 1 changed file with 46 additions and 1 deletion.
47 changes: 46 additions & 1 deletion docs/TROUBLESHOOTING_REVERSE_PROXY.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,49 @@ api:
You may also configure these values using the following environmental variables (both are required).

- `COLLECTOR_API_ENDPOINT=http://localhost:8080/custombasepath`
- `SCRUTINY_WEB_LISTEN_BASEPATH=/custombasepath`
- `SCRUTINY_WEB_LISTEN_BASEPATH=/custombasepath`

## Caddy Example

1. Create a Caddyfile
```yaml
# Caddyfile
:9090

# The `scrutiny` text in this file must match the service name in the docker-compose file below.
# The `/custom/` text is the custom base path scrutiny will be availble on.
reverse_proxy /custom/* scrutiny:8080

```
2. Create a `docker-compose.yml` file

```yaml
# docker-compose.yml
version: '3.5'

services:
scrutiny:
container_name: scrutiny
image: ghcr.io/analogj/scrutiny:master-omnibus
cap_add:
- SYS_RAWIO
ports:
- "8086:8086" # influxDB admin
volumes:
- /run/udev:/run/udev:ro
- ./config:/opt/scrutiny/config
- ./influxdb:/opt/scrutiny/influxdb
devices:
- "/dev/sda"
- "/dev/sdb"
environment:
- SCRUTINY_WEB_LISTEN_BASEPATH=/custom
caddy:
image: caddy
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
ports:
- "9090:9090"
```
3. run `docker-compose up`
4. visit [http://localhost:9090/custom/web](http://localhost:9090/custom/web) - access the scrutiny container via caddy reverse proxy

0 comments on commit fe80bed

Please sign in to comment.