I’m using a docker compose file, and I have everything running just fine, containers talking to each other as needed, NPM reverse proxying everything via a duckdns subdomain… everything’s cool.
Problem is, I can still go to, for example, http://192.168.1.30:8080/ and get the services without http.
I’ve tried commenting out the ports in the compose file, which should make them only available on the internal network, I thought. But when I do that, the containers can no longer connect to each other.
Any advice for me?
Edit:
Thanks for the quick & helpful suggestions!
While investigating bridge networks, I noticed a mention that containers could only find each other on the default container bridge by container name, which I did not know. I had tried 127.0.0.1, localhost, the external IP, hostnames, etc but not container names.
In the end, the solution was just to use container names when telling each container how to find the others. No need for creating bridge networks or any other shenanigans.
Thank you!
You need to change the nginx config (for the website you will be hosting your services at. /etc/nginx/sites-available/yourdomain.com
You can reroute all http requests to https in that config.
Watch a video on how nginx works and how to set it up, and then look for example nginx configs for your services. It’s a pretty standard setting nowadays so the syntax should be easy to find.
I think nginx can be setup to work locally only, but do you even need it for that? It’s primary use is to proxy http requests to the different websites running on your server, enable https via letsencryt and so on, I think.