Skip to content

Docker Compose deployment for Stirling PDF with custom branding, Traefik integration, and certificate-based PDF signing.

License

Notifications You must be signed in to change notification settings

bauer-group/CS-PDF-Toolbox

Repository files navigation

PDF Toolbox (Stirling PDF)

Deutsche Version / German Version

Docker Compose deployment for Stirling PDF with custom branding, Traefik integration, and certificate-based PDF signing.

Features

  • Custom Branding (Logo, Favicon, App Name)
  • Custom Docker Image with pre-installed OCR languages
  • Traefik Integration with Let's Encrypt
  • PDF Signing with Server Certificate (Base64 Environment Variable)
  • OAuth/OIDC Support (optional)
  • Coolify-compatible

Quick Start

1. Clone Repository

git clone https://github.com/bauer-group/CS-PDF-Toolbox.git
cd CS-PDF-Toolbox

2. Start Tools Container

# Windows
.\tools\run.ps1
# Linux/macOS
./tools/run.sh

3. Generate Secrets

# Inside tools container:
./scripts/generate-secrets.sh

Note: The script automatically creates .env from .env.example and generates a secure admin password.

4. Customize .env (optional)

# Edit .env for custom settings
nano .env

5. Customize Branding (optional)

Place logos in src/branding/:

  • logo.png (Logo for navbar)
  • favicon.png (Browser tab icon)
# Inside tools container:
./scripts/generate-assets.sh

See Branding Documentation for details.

6. Create Signing Certificate (optional)

# Inside tools container:
./scripts/generate-cert.sh

# Or for CA-signed certificates:
./scripts/ca-cert-workflow.sh

Note: The script writes KEYSTORE_PASSWORD and KEYSTORE_P12_BASE64 automatically to .env. The container decodes the certificate at startup.

See PDF Signing Documentation for details.

7. Start

# Development (http://localhost:8080)
docker compose -f docker-compose.development.yml up -d --build

# Production with Traefik
docker compose -f docker-compose.traefik.yml up -d --build

# Coolify
docker compose -f docker-compose.coolify.yml up -d --build

Access

Environment URL
Development http://localhost:8080
Production https://pdf.app.bauer-group.com
API Docs /swagger-ui/index.html
Health /api/v1/info/status

Documentation

Document Description
Installation Deployment & Quick Start
Configuration Environment Variables
Security Login & OAuth
PDF-Signing Digital Signatures
Branding Custom Branding
API REST API

Directory Structure

.
├── docker-compose.yml              # Alias for development
├── docker-compose.development.yml  # Development (with ports)
├── docker-compose.traefik.yml      # Production (with Traefik)
├── docker-compose.coolify.yml      # Coolify PaaS
├── .env.example                    # Example configuration
├── certs/                          # Signing certificates (gitignored)
├── docs/
│   ├── en/                         # English documentation
│   └── de/                         # German documentation
├── scripts/
│   ├── generate-assets.sh          # Generate branding assets
│   ├── generate-cert.sh            # Generate certificate
│   ├── generate-secrets.sh         # Generate secrets
│   ├── ca-cert-workflow.sh         # CA certificate workflow
│   └── convert-to-p12.sh           # Convert PEM to P12
├── tools/                          # Development Tools Container
│   ├── run.sh / run.cmd / run.ps1
│   └── Dockerfile
└── src/
    ├── branding/                   # Custom Branding Assets
    │   ├── logo.png
    │   └── favicon.png
    ├── scripts/
    │   └── entrypoint.sh           # Custom Entrypoint (Base64 Cert)
    └── Dockerfile                  # Custom Image

Tools Container

The tools container includes ImageMagick, OpenSSL, and all required utilities:

# Start (builds automatically if needed)
.\tools\run.ps1        # Windows PowerShell
.\tools\run.cmd        # Windows CMD
./tools/run.sh         # Linux/macOS

# Force rebuild
.\tools\run.ps1 -Build
./tools/run.sh --build

# Run script directly
./tools/run.sh -s './scripts/generate-cert.sh'

Commands

# Start (development)
docker compose -f docker-compose.development.yml up -d --build

# Start (production with Traefik)
docker compose -f docker-compose.traefik.yml up -d --build

# Logs
docker compose -f docker-compose.development.yml logs -f stirling-pdf

# Container status
docker compose -f docker-compose.development.yml ps

# Stop
docker compose -f docker-compose.development.yml down

# Rebuild without cache
docker compose -f docker-compose.development.yml build --no-cache

License

This deployment project is licensed under the MIT License. Stirling PDF uses an open-core model with MIT License.

Official Documentation

About

Docker Compose deployment for Stirling PDF with custom branding, Traefik integration, and certificate-based PDF signing.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 3

  •  
  •  
  •