Stirling-Tools / Stirling-PDF

#1 Locally hosted web application that allows you to perform various operations on PDF files
https://stirlingpdf.com
MIT License
47.02k stars 3.84k forks source link

[Feature Request]: New Enviroment Variable for `Unix Socket` #1497

Open pineapples5972 opened 5 months ago

pineapples5972 commented 5 months ago

Feature Description

Some servers has unix sockets dedicated to host their services. For example exposing /srv/http/ directory for users to deploy their services at here unix socket can be added to create https://spdf.myserver.xyz

So in current sitution we use socat to create unix socket at that location which listening for particular port i.e 8080 . /usr/bin/socat UNIX-LISTEN:/srv/http/spdf,mode=660,fork TCP:localhost:8080

And need systemd service file to run this constantly in bg

So this need can be eliminated with Enviromental variable for Systemd service file.

Why is this feature valuable?

For hosting without docker sometimes you need to add two service file

There shouldnt be need to run two systemd service files one for stirling pdf and second for unix socket There are applications which uses Envirment variable to be added into systemd Service file itself which saves this need.

Environment="SPDF_UNIX_SOCKET=/srv/http/spdf"

Suggested Implementation

Some program like calibre-web provide such env variable eg. Environment="CALIBRE_UNIX_SOCKET=/srv/http/calibre"

We can add similar env var for systemd service file Environment="SPDF_UNIX_SOCKET=/srv/http/spdf"

Additional Information

No response

No Duplicate of the Feature

Frooodle commented 5 months ago

I will add this but will ask for you to test as I will be unable to!

MrErne commented 2 months ago

Hello,

There is a version fixed to implement this feature, I can test it to :) ?

Thank you,

pineapples5972 commented 2 months ago

I will add this but will ask for you to test as I will be unable to!

Glad to test it.