News for hackers. Stuff that matters.
Re:Show HN: PNGR – Docker-compose for a Postgres-Nginx-Golan... by kissgyorgy on Saturday November 23, 2019 @01:26AM (#21612776)
You might not need nginx if you are using Go. I would only add it if neccessary.
Re:Show HN: PNGR – Docker-compose for a Postgres-Nginx-Golan... by karlkeefer on Saturday November 23, 2019 @01:00PM (#21615439)
It's really useful (to me) to be able to split the api traffic and front-end traffic and the nginx configs make that really clear. Agree that it could be a lot smaller footprint, though, if I built front-end files into the golang app and had a single docker image that _did it all_ (besides the database).
Re:Show HN: PNGR – Docker-compose for a Postgres-Nginx-Golan... by y4mi on Saturday November 23, 2019 @09:53AM (#21614380)
are you seriously telling people that they should run their application as root?

you do know that ports <1000 (http: 80, https: 443) require root, right?

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?