From 11f673bf7a11a868a817b286e9ad78c23db2404e Mon Sep 17 00:00:00 2001 From: Nicole Rappe Date: Thu, 11 Jan 2024 23:25:22 -0700 Subject: [PATCH] Update Containers/Docker/Docker Compose/Stirling-PDF.md --- .../Docker/Docker Compose/Stirling-PDF.md | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/Containers/Docker/Docker Compose/Stirling-PDF.md b/Containers/Docker/Docker Compose/Stirling-PDF.md index 6d40272..51edb75 100644 --- a/Containers/Docker/Docker Compose/Stirling-PDF.md +++ b/Containers/Docker/Docker Compose/Stirling-PDF.md @@ -1,5 +1,6 @@ **Purpose**: This is a powerful locally hosted web based PDF manipulation tool using docker that allows you to perform various operations on PDF files, such as splitting merging, converting, reorganizing, adding images, rotating, compressing, and more. This locally hosted web application started as a 100% ChatGPT-made application and has evolved to include a wide range of features to handle all your PDF needs. +## Docker Configuration ```jsx title="docker-compose.yml" version: "3.8" services: @@ -17,6 +18,12 @@ services: - /srv/containers/stirling-pdf/logs:/logs/ ports: - 8080:8080 + labels: + - "traefik.enable=true" + - "traefik.http.routers.stirling-pdf.rule=Host(`pdf.bunny-lab.io`)" + - "traefik.http.routers.stirling-pdf.entrypoints=websecure" + - "traefik.http.routers.stirling-pdf.tls.certresolver=letsencrypt" + - "traefik.http.services.stirling-pdf.loadbalancer.server.port=8080" restart: always networks: docker_network: @@ -33,3 +40,25 @@ networks: ```jsx title=".env" N/A ``` + +## Traefik Reverse Proxy Configuration +If the container does not run on the same host as Traefik, you will need to manually add configuration to Traefik's dynamic config file, outlined below. +``` yaml +http: + routers: + stirling-pdf: + entryPoints: + - websecure + tls: + certResolver: letsencrypt + http2: + service: stirling-pdf + rule: Host(`pdf.bunny-lab.io`) + + services: + stirling-pdf: + loadBalancer: + servers: + - url: http://192.168.5.54:8080 + passHostHeader: true +``` \ No newline at end of file