Docker Community Forums

Share and learn in the Docker community.

Changing ports in docker-compose.yml after building, but still forwarding to old port


(Jasonrob) #1

I’ve been testing out Docker and using docker-compose. For a test setup I built a docker-compose.yml file for two WordPress a linked MariaDB and a MyPHPAdmin site. I used ports 8080 and 8085 for the WordPress deployments. That all worked great after I ran the ‘docker-compose up’ command. Then I decided I wanted to test out Shipyard https://shipyard-project.com/ to give me a nice UI and to help with the eventual deployment of multiple sites to multiple hosts. I ran their automated install but that uses port 8080 also.

So I went back into the docker-compose.yml file and edited the first WordPress site to use port 8084 instead, and then ran ‘docker-compose up’ and it stated that it was “Recreating” it. The problem is if I go to :8084 it will redirect me to port 8080 which is now the ShipYard UI. I’ve looked through the documentation but I can’t seem to find a command to fix this. I also attempted to change the port to 8083 but that then sends it to 8080 again (also tried 8090). When I run a ‘docker-compose ps’ it shows under ports “0.0.0.0:8083->80/tcp” as you might expect but then when I go to that IP:8083 it then sends me to IP:8080. …?!

What am I missing here? Is this a bug?

Thanks in advance,

-Jason