Can I deploy a Go Application + MySQL database into a single droplet ?

Hi guys.

I’m new to deployment of a server and digital ocean. I want to create an API Server that use go language and also want to create a database server using MySQL.

My question is :

  1. Can I deploy a Go Application + MySQL database into a single droplet ? Or must I use DigitalOcean Managed MySQL Database for the database ?
  2. What did I need to deploy a go API to digital ocean ? Is I only need to upload my binary go file to deploy it ? Or also need docker or something else like that ?



Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello @dickywijayaa,

You can follow the steps here on how to deploy a Go Web application with Nginx:

By using Nginx, you will then be able to secure your web application by adding an SSL certificate, you can take a look at this tutorial here:

Regarding your MySQL question, you can install MySQL directly on your Droplet, I would recommend enabling backups for your Droplet so that if anything goes wrong, you would be able to restore to an older backup.

Hope that this helps! Regards, Bobby