Re:Show HN: PNGR – Docker-compose for a Postgres-Nginx-Golan...
by jsjohnst on Saturday November 23, 2019 @10:42AM
(#21614640)
These are containers, why on earth would you assume an app needs to run on a privileged port? You just run the app in the container on say 8080 or 8443 inside the container and expose it outside the container as 80 or 443 respectively.
Re:Show HN: PNGR – Docker-compose for a Postgres-Nginx-Golan...
by y4mi on Saturday November 23, 2019 @02:09PM
(#21615840)
Ha, i literally forgot about that. Despite using docker every other day. Thanks for correcting me
Re:Show HN: PNGR – Docker-compose for a Postgres-Nginx-Golan...
by vhodges on Saturday November 23, 2019 @11:26AM
(#21614866)
sudo apt-get install libcap2-bin # Debian/Ubuntu/etc
sudo setcap 'cap_net_bind_service=+ep' /path/to/program
will allow program to bind low numbered ports by non-root user.
Just learned this deploying a new rails app behind caddy2 (which is running as the deploy user I setup).
Re:Show HN: PNGR – Docker-compose for a Postgres-Nginx-Golan...
by zrail on Saturday November 23, 2019 @10:19AM
(#21614525)
You only need root to open the port. Once you do that you can drop privileges.
Re:Show HN: PNGR – Docker-compose for a Postgres-Nginx-Golan...
by kissgyorgy on Saturday November 23, 2019 @08:09PM
(#21617683)
I'm not and what does it have to do with what I said? :)
Do you know that nginx must be running as root, right?
you do know that ports <1000 (http: 80, https: 443) require root, right?