docs: add example docker-compose usage

This commit is contained in:
Christian Nicolai 2023-02-16 16:00:18 +01:00 committed by GitHub
parent 4a5e258a86
commit 8e2ac7e677
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 25 additions and 1 deletions

View File

@ -61,7 +61,31 @@ If the information exposed is important to you serve it via the VPN or use a web
There is a [Dockerfile](docs/Dockerfile) that can be used to build a Docker image for running openvpn-status-web.
The [Debian 6 init script](docs/debian-init-openvpn-status-web) assumes that openvpn-status-web is installed into the system ruby (no RVM support) and the config.yaml is at `/opt/openvpn-status-web/config.yaml`. Modify to your needs.
This can for example be used with `docker-compose` via:
```yaml
version: "2.4"
services:
openvpn-status-web:
image: your-selfbuilt-docker-image
user: root # needed since the default status files are chmod 600
volumes:
- /path/to/host/config.yml:/etc/openvpn-status-web/config.yml:ro
- /run/openvpn-server:/run/openvpn-server
ports:
- "8080:8080"
```
The `/path/to/host/config.yml` could be:
```yaml
host: "0.0.0.0"
port: "8080"
vpns:
my-cool-vpn: # the following depends on your setup
version: 2
status_file: "/run/openvpn-server/status-my-cool-vpn.log"
```
## License