Article 4TM8E Close docker ports after config of Nginx reverse proxy?

Close docker ports after config of Nginx reverse proxy?

by
nicedreams
from LinuxQuestions.org on (#4TM8E)
I'm using a docker container for Gotify on DigitalOcean using:

docker run -d \
--name gotify \
-p 8899:80 \
-v /opt/docker-data/gotify/data:/app/data \
--restart always \
gotify/server:latest

which is working fine going to http://sub.domain.com:8899

I then installed Nginx locally on the server and configured it for reverse proxy with letsencrypt and that is working now by going to https://sub.domain.com without typing in :8899

The issue I'm having is that port 8899 is still open to the internet automatically when I run the container and I want to run the Gotify docker container without access to 8899 and only working through the local Nginx reverse proxy on port 80.

I'm confused on how to do this. I looked into creating new docker networks, but Gotify conflicts at port 80 with my local Nginx install at port 80 since it seems I use port 8899:80 within the Gotify image?latest?d=yIl2AUoC8zA latest?i=4HjovkcadNA:nF2S_XEqBj8:F7zBnMy latest?i=4HjovkcadNA:nF2S_XEqBj8:V_sGLiP latest?d=qj6IDK7rITs latest?i=4HjovkcadNA:nF2S_XEqBj8:gIN9vFw4HjovkcadNA
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments