DigitalOcean, Docker, and Multiple Applications

I currently have a static website hosted on HostGator, and am looking to reduce costs. I’ve looked at droplets and docker as a solution with kubernetes orchestrating it all, but I also had the idea that I could also host multiple web apps on the same droplet with the use of an NGINX container. My project would look something like the following.

Does anyone know if that would be possible on a droplet, and if so, which one I should go with? In addition, will I need to build an FTP Server to sit on top or can i replace docker containers as I upgrade and change the code? I know the coding is possible. Devon Crawford (coding YouTuber) has done something similar with his website and web apps. So any help would be appreciated.

I’m currently using docker on a $10 droplet, and been meaning at some point to get around to updating my profile site to include my projects again and having those projects running in containers via docker.

Digital Ocean did recently add kubernetes though I’ve only messed with that a little bit through a tutoral I took on Udemy, but it was not using Digital Ocean. Kubernetes was neat but a bit of a headache, and not sure its something I would really need right now.

Far as the databases, I don’t think you’d want those on the same droplet. Digital Ocean does also offer Postgres. Not saying you couldn’t do it, but might not be the best idea.

Don’t think you need a ftp server though, you can just use ssh to copy over files, and ssh into the server to use docker to pull updated images from docker hub or git pull etc.

@jnmorse What would be the reason for not putting the databases on the same droplet?

For instance my current droplet is running on Ubuntu 16.04 LTS, Say for some reason I decide to switch to running on a new droplet running CentOS instead.

Maybe I could transfer the existing database files to the new server, but this is garenteeded to go smoothly and even if it did maybe some user using the site I deleveloped submited something just before I brought the new server online, now the new database does not have that entry and I might have already deleted the old droplet with it.

Second scaling. In the video I just watched from the preson you mentioned talking about kubernetes talked about scaling the database. by leveraging a database setup that can handle the scaling for me, I don’t have to worry as much about doing that part myself.

so the advantages of off loading the database is 1) its decoupled from the web server so changing the web sever from one droplet to another or a completely different service won’t effect it, 2) ease of scale that effects only the database

2 Likes