Stirling-PDF icon indicating copy to clipboard operation
Stirling-PDF copied to clipboard

feature request - change running port

Open mmomjian opened this issue 1 year ago • 3 comments

I would prefer to run sPDF on a different port than 8080. I have tried using command: java -Dlocal.server.port=32769 -jar /app.jar in the docker compose, which does change the 'navigate to' message in the logs, but Tomcat still runs on 8080. Does anyone know how to change the tomcat listening port in sPDF?

mmomjian avatar Nov 11 '23 17:11 mmomjian

Is it not sufficient to simply change the host port in the compose file? For instance:

version: '3.3'
services:
  stirling-pdf:
    image: frooodle/s-pdf:latest
    ports:
      - '80:8080'
    volumes:
      - /location/of/trainingData:/usr/share/tesseract-ocr/4.00/tessdata #Required for extra OCR languages
      - /location/of/extraConfigs:/configs
#      - /location/of/customFiles:/customFiles/
    environment:
      - DOCKER_ENABLE_SECURITY=false

sNiXx avatar Nov 30 '23 19:11 sNiXx

Hello, thanks for your reply. I run my containers attached to a wireguard tunnel to allow for access outside the network, using the compose command network_mode: 'container:wireguard'. In this setting, ports: does not work as the port is not being published on the host. Therefore, since I can't change the internal port, I am forced to run spdf on a separate wireguard instance to avoid port conflicts. I understand if this is not possible but I just wanted to see if there is an easy way to change the internal HTTP server port. Thanks!

mmomjian avatar Dec 03 '23 15:12 mmomjian

Hi, For my installation it would also be nice to have the option to change the port. I'm using macvlan which allows using http standard ports. Deviating ports are a bit tedious to use.

FrankOverIP avatar Dec 05 '23 20:12 FrankOverIP

To change the port for the app itself you can add this in the config/settings.yml file

local:
  server:
    port: 443
server:
  port: 443

Frooodle avatar Jan 04 '24 17:01 Frooodle

Thank you! I can confirm that this works perfectly. Have a great day.

mmomjian avatar Jan 04 '24 17:01 mmomjian

To change the port for the app itself you can add this in the config/settings.yml file

local:
  server:
    port: 443
server:
  port: 443

hi,

I am facing an issue here - I am a noob at this - even after adding the following to the settings.yml file under /configs

local: server: port: 443 server: port: 443

the TOMCAT server is listening on port 8080 and I am unable to successfully deploy stirling-pdf... a noob friendly guide will be really helpful.

Thanks!

helpmegithub0101 avatar Feb 24 '24 18:02 helpmegithub0101