From 8e2ac7e677ad70cef723639a54511552d822e6a6 Mon Sep 17 00:00:00 2001 From: Christian Nicolai Date: Thu, 16 Feb 2023 16:00:18 +0100 Subject: [PATCH] docs: add example docker-compose usage --- README.md | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e390c01..5c18245 100644 --- a/README.md +++ b/README.md @@ -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