webdevops / php-docker-boilerplate

:stew: PHP Docker Boilerplate for Symfony, Wordpress, Joomla or any other PHP Project (NGINX, Apache HTTPd, PHP-FPM, MySQL, Solr, Elasticsearch, Redis, FTP)
https://webdevops.io/projects/php-docker-boilerplate/
MIT License
561 stars 185 forks source link

Set up many virtual hosts in main app container #80

Closed danwyry closed 5 years ago

danwyry commented 5 years ago

Hi, Is there a way to set up many virtual hosts pointing to to diferent paths in app/ through image or environment configuration? I'm very new to Docker and have been trying to do this with this php-docker-boilerplate (which I found very usefull btw) and couln't figure it out.

htuscher commented 5 years ago

No that's not possible without building a custom image.

But usually you would use 1 container per vhost. If you're concerned about port 80 being occupied by the first container, take a look at https://github.com/jwilder/nginx-proxy or https://jtreminio.com/blog/traefik-on-docker-for-web-developers/