By Fabiansson
Hello everyone!
I’m just getting started on DigitalOcean and I’m lookin for a setup which is some sort of multi-purpose. Right now I need to host two small HTML sites under different domain names. As for now I think this would be a easy task with Nginx Server Blocks. But then I’d also like to deploy a MERN (mongoDB is external) App for which I have been using Heroku. For that alone I was going to use Dokku.
Now what are my best options if I’d like to host all of these three, and further down the road maybe even more, on a single Droplet? Any advice here?
Thanks a lot in advance!
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!
I can think of 2 ways to do this:
Just install your MERN components on your droplet, then using the Nginx instance setup a reverse proxy to your Node JS application
Or use docker to run your MERN application in and then again using Nginx add a reverse proxy
The benefit of going with option 2 is that you can redeploy new images easier.
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.