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

How to change the port of 8080?

Open brisk21 opened this issue 9 months ago • 4 comments

image

I want to change the port of 8080

brisk21 avatar May 06 '24 01:05 brisk21

So I also faced this issue, wanted to deploy on the host 0.0.0.0 and port 3000. So from the directory where you are running the Stirling-PDF, it would create a configs directory there.

That would contain configs.yml and custom_configs.yml In the custom_configs.yml, add:

server:
  host: 0.0.0.0 #(Can skip if don't want to add any).
  port: 3000 #(or whatever new port you want)

Note: IIRC, the configs directory would be created when you run Stirling-PDF for the first time, so to have the config before that, would have to create a configs folder and add the custom_configs.yml by yourself.

That's it, it would overwrite the config of the configs.yml at the application start, and deploy on the given host and port. Hope it helps!

bluestero avatar May 06 '24 07:05 bluestero

@Frooodle It would be really cool if these options were available as env vars, so it's easier to configure docker-compose.

t0mmili avatar May 15 '24 09:05 t0mmili

If you are running in docker you have no need to change the port anyway since you can change the docker exposed port instead right?

Frooodle avatar May 15 '24 09:05 Frooodle

If you are running in docker you have no need to change the port anyway since you can change the docker exposed port instead right?

It depends. I think it was discussed in other issue. If on default port 8080 - no problem. But when I redirect to e.g. 8181, it's not working behind nginx proxy.

t0mmili avatar May 15 '24 09:05 t0mmili