Docker Community Forums

Share and learn in the Docker community.

Can I update already built docker-compose setup?

docker

(Hadifarnoud) #1

I have built a few containers using docker-composer from this repo.

however, I now need to have another container for rails and maybe another one for email. can I simply modify docker-compose.yml file and do another docker-compose up ?

in my case, is it even possible to have two web server at the same machine? how can I handle port 80 exposure?


#2

@hadifarnoud - after you make changes to your docker-compose.yml, you would need to rebuild, using docker-compose build.

It’s possible to have two web servers on the same machine, just that they have to be on different ports (80 and 81, for example).

Made a fork and added my change here: https://github.com/Ectsang/php-dockerized

http://erictsang.co/can-i-update-already-built-docker-compose-setup/


(Hadifarnoud) #3

Thanks @erictsang! so I assume I can use nginx reverse proxy to map that server to subdomain.domain.com now. right?


#4

Yep. You sure can. :smile: