Before going forward, make sure golang program work locally and ready to deploy.
- Prepare your project with Docker configuration (Dockerfile).
- Also need to push the project to Github and update the module structure.
- Golang modules should structured like github.com /username/ repo-name/module and re-initialize with
go mod init /username/repo-name
Droplet
Create Docker Droplet in the DigitalOcean Cloud. In the console (cloud) clone the Github repository and build docker image.
Let’s run the container, which is similar to what do you have done in development machine.
Please see golang docker guide for more instructions
Go to your browser and try accessing API , eg: 137.184.188.21:8080 and it should work.
- How to use MSSQL Server on ARM based Mac.
- Access Docker MSSQL Container from Parallel (Mac Mini M2)
- Mac Mini M2 for Windows Developers
- Free static app in DigitalOcean
- Deploy golang API in Digital Ocean using docker container
- Create a docker droplet in DigitalOcean
- How to Containerize Golang app with Docker
- Accessing DigitalOcean droplets in Windows/Linux remotely
- What is a Droplets in DigitalOcean
- DigitalOcean the best free cloud for developers