Docker 部署 stirling-pdf 组件

本文详细介绍了Stirling-PDF项目的定制配置,包括文件目录结构、vimsettings.yml和settings.yml的配置,部署Docker容器的命令,以及如何修改应用名称、图标和功能的隐藏。
摘要由CSDN通过智能技术生成

项目地址:https://github.com/Stirling-Tools/Stirling-PDF


一.文件目录信息

customFiles是自定义样式,把static文件夹放在customFiles中

/data/mixos/assembly/stirling-pdf/customFiles/static/css

删除不需要的图标和样式:每个css类中增加下方代码

#footer{
    display: none;
}

#languageDropdown{
    display:none;
	width:0px;
	height:0px;
}

二.配置文件信息

cd /data/mixos/assembly/stirling-pdf/configs
vim settings.yml

settings.yml:

# Welcome to settings file
# Remove comment marker # if on start of line to enable the configuration
# If you want to override with environment parameter follow parameter naming SECURITY_INITIALLOGIN_USERNAME

security:
  enableLogin: false # set to 'true' to enable login
  csrfDisabled: true
  loginAttemptCount: 5 # lock user account after 5 tries
  loginResetTimeMinutes : 120 # lock account for 2 hours after x attempts

system:

  defaultLocale: 'zh-CN' # Set the default language (e.g. 'de-DE', 'fr-FR', etc)
  googlevisibility: false # 'true' to allow Google visibility (via robots.txt), 'false' to disallow
  enableAlphaFunctionality: false # Set to enable functionality which might need more testing before it fully goes live (This feature might make no changes)
  customApplications:
    installBookFormats: false # Installs Calibre for book format conversion (For non docker it must be manually downloaded but will need to be true to show in UI)
    installAdvancedHtmlToPDF: false # DO NOT USE EXTERNALLY, NOT SAFE! Install wkHtmlToPDF (For non docker it must be manually downloaded but will need to be true to show in UI)

#ui:
#  appName: exampleAppName # Application's visible name
#  homeDescription: I am a description # Short description or tagline shown on homepage.
#  appNameNavbar: navbarName # Name displayed on the navigation bar

ui:
  appName: 创变
  homeDescription: PDF一站式服务,满足您的所有PDF需求。 # Short description or tagline shown on homepage.


endpoints:
  toRemove: [] # List endpoints to disable (e.g. ['img-to-pdf', 'remove-pages'])
  groupsToRemove: [] # List groups to disable (e.g. ['LibreOffice'])

metrics:
  enabled: true # 'true' to enable Info APIs (`/api/*`) endpoints, 'false' to disable
  customStaticFilePath: '/customFiles/static/' # Directory path for custom static files

AutomaticallyGenerated:
  key: 6d321144-c0e6-4888-801d-b9e013086eae

三.部署命令

docker pull frooodle/s-pdf:latest

docker run -d -p 8908:8080 -v /data/mixos/assembly/stirling-pdf/data/:/usr/share/tesseract-ocr/4.00/tessdata -v /data/mixos/assembly/stirling-pdf/configs/:/configs -v /data/mixos/assembly/stirling-pdf/customFiles:/customFiles -e DOCKER_ENABLE_SECURITY=false -e SYSTEM_ROOTURIPATH=/stirlingpdf --name stirlingpdf frooodle/s-pdf

访问地址:http://10.30.0.29:8908

location /stirlingpdf {
        proxy_pass http://10.30.0.29:8908/stirlingpdf;
}

四.其他配置

1. 修改app名称和描述:

vim /data/mixos/assembly/stirling-pdf/configs/settings.yml

ui:
  appName: 创变
  homeDescription: PDF一站式服务,满足您的所有PDF需求。 # Short description or tagline shown on homepage.

2. 自定义图标:将static中的选中图片按尺寸切好后覆盖即可

3. 图标设置圆角:/static/css/navbar.css添加代码

.main-icon {
         border-radius: 40%;
}

4. 浏览pdf功能去掉顶部的小图标以及字样:/static/pdfjs/css/viewer.css 添加代码

.main-icon {
  display: none;
}
[class~="icon-text"] {
  display: none;
}

5. 删除“浏览pdf”功能:/static/css/home.css 添加代码

#view-pdf{
    display: none;
}

  • 7
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Docker是一种开源的容器化平台,可轻松部署、运行和管理容器化应用程序。Nginx是一款高性能的Web服务器和反向代理服务器,而Nginx Proxy Manager则是一个基于Nginx的图形化界面工具,用于管理Nginx代理服务器。 要在Docker部署Nginx Proxy Manager,需要执行以下步骤: 1. 首先,确保你的系统上已安装了Docker。你可以通过命令"docker --version"来检查是否已成功安装。 2. 打开终端或命令提示符,并使用Docker命令从Docker Hub下载Nginx Proxy Manager的镜像。可以使用以下命令下载并创建容器: ``` docker run -d -p 80:80 -p 81:81 -p 443:443 -v nginx-proxy-manager_data:/data -v /var/run/docker.sock:/var/run/docker.sock jlesage/nginx-proxy-manager ``` 3. 这个命令会从Docker Hub上下载最新版本的Nginx Proxy Manager镜像,并在本地创建一个名为"nginx-proxy-manager"的容器。该容器将监听80、81和443端口,并将其映射到宿主机上。 此外,该命令还将容器中的/data目录映射到名为nginx-proxy-manager_data的Docker卷,以及将宿主机的/var/run/docker.sock文件映射到容器的/var/run/docker.sock文件中。 4. 当容器成功创建后,你可以通过访问http://localhost:81来访问Nginx Proxy Manager的图形化界面。在该界面中,你可以添加和管理Nginx反向代理服务器、创建和编辑主机、设置SSL证书等。 通过以上几个简单的步骤,你可以在Docker中轻松地部署Nginx Proxy Manager,实现代理服务器的管理与配置。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值