Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add-stirling-pdf-docker-compose-and-config #2213

Merged
merged 2 commits into from
Nov 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Apps/stirling-pdf/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"id": "stirling-pdf",
"version": "0.35.0",
"image": "stirlingpdf/stirlingpdf",
"youtube": "",
"docs_link": "https://community.bigbeartechworld.com/t/added-stirling-pdf-to-bigbearcasaos/2265#p-4248-documentation-3",
"big_bear_cosmos_youtube": ""
}
86 changes: 86 additions & 0 deletions Apps/stirling-pdf/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Docker Compose configuration for BigBearCasaOS Stirling PDF Service
# This service provides a web interface for a Local hosted web based PDF editor

# Name of the big-bear-stirling-pdf application
name: big-bear-stirling-pdf

# Service definitions for the big-bear-stirling-pdf application
services:
# Main service configuration for the CasaOS User Management application
# This service provides a web interface running on port 5000 for user administration
big-bear-stirling-pdf:
# Name of the container
container_name: big-bear-stirling-pdf

# Image to be used for the container specifies the stirling-pdf version and source
image: stirlingtools/stirling-pdf:0.35.0

# Container restart policy - restarts the container unless manually stopped
restart: unless-stopped

# Environment variables for service configuration
environment:
# Set to true to download security jar (required for authentication login)
- DOCKER_ENABLE_SECURITY=false

# Download Calibre onto Stirling-PDF to enable PDF to/from book and advanced HTML conversion
- INSTALL_BOOK_AND_ADVANCED_HTML_OPS=false

# Define custom font libraries to install for document conversions
- LANGS=en_US
Comment on lines +22 to +30
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

⚠️ Potential issue

Security implications need to be documented

The codebase lacks proper documentation about security implications of the DOCKER_ENABLE_SECURITY setting. The only references to security are in the docker-compose.yml file, which merely states that it's "required for authentication login" without explaining the risks of disabling it. Recommend:

  1. Adding clear security documentation explaining the risks of running without authentication
  2. Including setup instructions for secure production deployments
  3. Consider changing the default to true for better security-by-default
🔗 Analysis chain

Review security implications of disabled authentication.

Setting DOCKER_ENABLE_SECURITY=false disables authentication, which could expose the PDF processing service to unauthorized access. Consider:

  1. Documenting the security implications in the installation tips
  2. Enabling security by default for production environments
  3. Adding guidance for secure configuration

Let's check if there's any documentation about security implications:


Let me search for more context about security documentation in other files.


Let me try a different approach to find security-related documentation.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for security-related documentation
rg -i "security|authentication|auth" Apps/stirling-pdf/

Length of output: 477


Script:

#!/bin/bash
# Search for README files and their content
fd README.md Apps/stirling-pdf/ -x cat {}

# Search for security-related configuration or documentation in other common locations
fd "SECURITY|security" Apps/stirling-pdf/

Length of output: 89


Script:

#!/bin/bash
# Search for documentation about security in markdown files and configuration
rg -i -g '*.{md,yml,yaml,txt}' 'security|authentication|auth' Apps/stirling-pdf/ -A 3 -B 3

# Look for any security-related code or configuration files
fd . Apps/stirling-pdf/ --type f --exec file {} | grep -i "security"

Length of output: 2081

🧰 Tools
🪛 yamllint (1.35.1)

[error] 25-25: trailing spaces

(trailing-spaces)


[error] 28-28: trailing spaces

(trailing-spaces)


# Volume mappings for persistent storage and configuration
# These mounts allow the container to interact with the host system
volumes:
# Required for monitoring system resources and container metrics
- /DATA/AppData/$AppID/tessdata:/usr/share/tessdata # Required for extra OCR languages

# Map port 8080 on the host to port 8080 on the container
ports:
- "8080:8080"

# CasaOS-specific configuration metadata
x-casaos:
envs:
- container: "DOCKER_ENABLE_SECURITY"
description:
en_us: "Docker Enable Security"
- container: "INSTALL_BOOK_AND_ADVANCED_HTML_OPS"
description:
en_us: "Install Book and Advanced HTML Ops"
- container: "LANGS"
description:
en_us: "Languages"
volumes:
- container: "/usr/share/tessdata"
description:
en_us: "Container Path: /usr/share/tessdata"
ports:
- container: "8080"
description:
en_us: "Container Port: 8080"

# Application metadata for CasaOS integration
# This section provides information for the CasaOS app store and installation process
x-casaos:
architectures:
- amd64
- arm64
main: big-bear-stirling-pdf
description:
en_us: Stirling PDF - Local hosted web based PDF editor
tagline:
en_us: Stirling PDF - Local hosted web based PDF editor
developer: "stirlingtools"
author: BigBearTechWorld
icon: "https://cdn.jsdelivr.net/gh/bigbeartechworld/big-bear-casaos/Apps/stirling-pdf/logo.png"
thumbnail: ""
title:
en_us: Stirling-PDF
category: BigBearCasaOS
port_map: "8080"
# Installation instructions and documentation
tips:
before_install:
en_us: |
Read this before installing: https://community.bigbeartechworld.com/t/added-stirling-pdf-to-bigbearcasaos/2265#p-4248-documentation-3
Binary file added Apps/stirling-pdf/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.