Poem 2020-06-07

Production Deployment with VPS, Docker Compose, Docker Machine, Golang, Nginx, and Let's Encrypt

Deploy Golang applications with Docker Compose, Nginx reverse proxy, and Let's Encrypt SSL/TLS certificates on VPS.

Read in: ja
Production Deployment with VPS, Docker Compose, Docker Machine, Golang, Nginx, and Let's Encrypt

Overview

I wanted to try running a Golang application in production using Docker Compose on a VPS, so I gave it a shot.

Environment

Here's a summary of the environment I actually tried.

Repository

I created a sample. github - bmf-san/go-production-boilerplate

On the production server, as long as you create users and open ports, you should be able to deploy for now...

By the way, since downtime occurs during deployment, separate consideration is necessary.

For deployment using docker-machine, this article was helpful. Qiita - Deploy an app from Mac to Docker on VPS using Docker Machine

I got a bit stuck with Let's Encrypt, but it wasn't a particularly difficult problem to solve since it wasn't an issue specific to containers.

Impressions

Using the generic driver of docker-machine allows for easy deployment. Considering downtime measures might be necessary, but for private application operations, it could be one of the considerations.

Tags: Docker Docker Compose Golang Let's Encrypt Nginx Docker Machine VPS
Share: 𝕏 Post Facebook Hatena
✏️ View source / Discuss on GitHub
☕ Support

If you enjoy this blog, consider supporting it. Every bit helps keep it running!


Related Articles