From f4c0d50642713388d75b857ef0ab11a847489cf9 Mon Sep 17 00:00:00 2001 From: Nathan Falvey Date: Tue, 3 Mar 2026 14:26:20 +0000 Subject: [PATCH] feat: :art: Added stirling pdf portainer configuration Added a new portainer configuration that can deploy a quick instance of stirling-pdf. --- templates/stirling-pdf/README.md | 28 ++++++++++++---- templates/stirling-pdf/docker-compose.yml | 39 +++++++++++++++++++++++ 2 files changed, 61 insertions(+), 6 deletions(-) diff --git a/templates/stirling-pdf/README.md b/templates/stirling-pdf/README.md index 40f4c5d..973d9c3 100644 --- a/templates/stirling-pdf/README.md +++ b/templates/stirling-pdf/README.md @@ -1,8 +1,24 @@ -# stirling-pdf (templates) + # Stirling-PDF (Portainer template) -### Description -Description for stirling-pdf goes here. +Stirling-PDF is a powerful, locally hosted web-based PDF manipulation tool. It allows you to perform various operations on PDF files, such as merging, splitting, rotating, converting, and adding watermarks, all while keeping your files private on your own infrastructure. -### Configuration -- Path: templates/stirling-pdf/docker-compose.yml -- Status: Draft +Quick notes: + +- **Privacy**: All files are processed locally on your server; no data is sent to external services. +- **Functionality**: Includes a wide range of features like OCR, compression, repair, and security (password protection). +- **Resources**: Depending on the operations (like OCR), this container may require significant CPU and RAM. + +Usage: + +1. Import the compose file into Portainer's Stacks or App Templates. +2. Configure the environment variables such as `DOCKER_ENABLE_SECURITY` if you wish to add authentication. +3. Map the necessary volumes if you want to persist custom settings or logs. +4. Deploy the stack via Portainer. +5. Access the web interface at `http://:8080`. + +Helpful links: + +- GitHub Repository: https://github.com/Stirling-Tools/Stirling-PDF +- Documentation: https://stirlingpdf.com/docs + +**Status:** Ready for configuration diff --git a/templates/stirling-pdf/docker-compose.yml b/templates/stirling-pdf/docker-compose.yml index e69de29..85db951 100644 --- a/templates/stirling-pdf/docker-compose.yml +++ b/templates/stirling-pdf/docker-compose.yml @@ -0,0 +1,39 @@ +services: + stirling-pdf: + container_name: Stirling-PDF + image: stirlingtools/stirling-pdf + mem_limit: 4g + cpu_shares: 1024 + security_opt: + - no-new-privileges:true + healthcheck: + test: timeout 10s bash -c ':> /dev/tcp/127.0.0.1/8080' || exit 1 + interval: 10s + timeout: 5s + retries: 3 + start_period: 90s + ports: + - 7890:8080 + volumes: + # Use relative paths or environment variables for portability + - ./tessdata:/usr/share/tessdata:rw + - ./configs:/configs:rw + - ./logs:/logs:rw + environment: + PUID: ${PUID:-1000} + PGID: ${PGID:-1000} + TZ: ${TIMEZONE:-UTC} + DOCKER_ENABLE_SECURITY: "true" + SECURITY_ENABLELOGIN: "true" + SECURITY_INITIALLOGIN_USERNAME: ${ADMIN_USERNAME:-admin} + SECURITY_INITIALLOGIN_PASSWORD: ${ADMIN_PASSWORD:-password123} + INSTALL_BOOK_AND_ADVANCED_HTML_OPS: "true" + SECURITY_CSRFDISABLED: "true" + SYSTEM_DEFAULTLOCALE: en_US + UI_APPNAME: StirlingPDF + UI_HOMEDESCRIPTION: Stirling PDF Converter, for all your pdf file needs. + UI_APPNAMENAVBAR: StirlingPDF + SYSTEM_MAXFILESIZE: 5000 + METRICS_ENABLED: true + SYSTEM_GOOGLEVISIBILITY: false + restart: unless-stopped # Changed to unless-stopped for better reliability \ No newline at end of file