By Marvix
Hi,
I just moving from shared host to here, I have 4 small WP sites, I need to host them in one droplet, I googled a lot, and got too many answers with many versions, I thought most of them are out dated.
So, I know that I can create virtual host with Nginx/Apache, but I came to know about Docker, and that confusing me, I do not need different DB and environment for each site since am the owner for all the sites, so should use docker, and virtual host will good for me?
Thanks,
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Docker is used to package an application and all its dependencies in one package called docker image which can be ran on any Linux machine and get your application up and running, it could be used to create development environments and also it can be used in production environment too with help from tools such as Kubernetes.
In your case, if your different sites do not have conflicting dependencies and all of them use the same version of PHP and all of its extensions then it is safe to host them using virtual hosts, however if you would like more control over the PHP version used in each one and all its dependencies then you can create multiple docker containers and host your code in each one of them separately and at the same time use nginx reverse proxy to serve your application from each docker container on a specific port.
Hope this helps.
Great, this cleared the picture. However, using Docker would require more RAM and CPU to setup the environment, right? Becuase I just set it up MySQL, and it takes around 150Mb of the 500.
Thanks
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.