openSUSE / open-build-service

Build and distribute Linux packages from sources in an automatic, consistent and reproducible way #obs
https://openbuildservice.org
GNU General Public License v2.0
937 stars 440 forks source link

Make apache2 dependency optional #9195

Open Smarre opened 4 years ago

Smarre commented 4 years ago

Hi,

Would it be possible to make apache (and passenger) dependency optional? I use nginx solely in my environments, and would rather not have a special apache installation, to ease maintenance.

I only tested quickly, but obs-api, being a Rails app, can work with other Rails deployment methods too, and even with the default Puma server that is nowadays used in Rails apps by default.

Running the site with Puma can be tested with starting a daemon with puma -e production -b unix:///srv/www/obs/api/tmp/sockets/puma with PWD == obs-api’s location. Then, it’s trivial to proxy traffic from for example nginx to Rails side:

upstream app {
     server unix:/srv/www/obs/api/tmp/sockets/puma fail_timeout=0;
 }
proxy_pass http://app

There is tons of different example configurations found on internet for Rails, but I can supply something too if there is a need for it. This snippet is just an example.

Smarre commented 4 years ago

To clarify, it is already possible to make the site work without apache2. It just is a required package by obs-api rpm.

hennevogel commented 4 years ago

Technically we certainly can switch to some virtual provides like http_daemon and only have a weak dependency on passenger.

I guess you should consider that no one here tests this setup and nearly all our users deploy via our appliances. So while all of this is technically possible and this might be your personal preferences to deploy, you'll will be on your own.

Smarre commented 4 years ago

Yes, it’s more of that I’d rather not just have a lock for apache and passenger packages and need to do all updates with failing dependency checks.