diff --git a/reverse-proxy/README.md b/reverse-proxy/README.md index 868b2fe..6a29eb3 100644 --- a/reverse-proxy/README.md +++ b/reverse-proxy/README.md @@ -16,10 +16,20 @@ If you are already running a reverse proxy, then the above will not work as it w If you already have NGINX running as a system service, use the configuration file in the `nginx` directory. -Edit the file `reverse-proxy/nginx/plausible` to contain the domain name you use for your server, then copy it into NGINX's configuration folder. Enable it by creating a symlink in NGINX's enabled sites folder. Finally use Certbot to create a TLS certificate for your site. +Edit the file `reverse-proxy/nginx/plausible` to contain the domain name you use for your server, then copy it into NGINX's configuration folder. Enable it by creating a symlink in NGINX's enabled sites folder. Finally use Certbot to create a TLS certificate for your site: ```shell $ sudo cp reverse-proxy/nginx/plausible /etc/nginx/sites-available $ sudo ln -s /etc/nginx/sites-available/plausible /etc/nginx/sites-enabled/plausible $ sudo certbot --nginx ``` + +### Traefik 2 + +If you already have a Traefik container running on Docker, use the docker-compose file in the `traefik` directory. Note that it assumes that your Traefik container is set up to support certificate generation. + +Edit the file `reverse-proxy/traefik/docker-compose.traefik.yml` to contain the domain name you use for your server, then combine it with the existing docker-compose files: + +```shell +$ docker-compose -f docker-compose.yml -f reverse-proxy/traefik/docker-compose.traefik.yml up +``` diff --git a/reverse-proxy/traefik/docker-compose.traefik.yml b/reverse-proxy/traefik/docker-compose.traefik.yml new file mode 100644 index 0000000..6186e4d --- /dev/null +++ b/reverse-proxy/traefik/docker-compose.traefik.yml @@ -0,0 +1,8 @@ +version: "3.3" +services: + plausible: + labels: + traefik.enable: "true" + traefik.http.routers.plausible.rule: "Host(`example.com`)" # change to your domain name + traefik.http.routers.plausible.entrypoints: "websecure" + traefik.http.services.plausible.loadbalancer.server.port: "8000"