Home
Softono

Medium Go Nginx Docker

Open source MIT Dockerfile
49
Stars
17
Forks
2
Issues
1
Watchers
7 years
Last Commit

 About Medium Go Nginx Docker

Use Nginx with Docker to serve a Golang app.

Platforms

Web Self-hosted Docker

Languages

Dockerfile

Need Help Installing Medium Go Nginx Docker?

We provide expert installation service for this software. Our team will install, configure, and secure Medium Go Nginx Docker on your server. plans start at just $30.

Medium Go Nginx Docker

View on GitHub

Use Nginx Reverse Proxy to serve Go Services

Golang served by Nginx reverse proxy.

Check the tutorial on Medium

Requirements

Installation

  • Browse the repository's root
  • Build the images
    • docker-compose build
  • Start containers
    • docker-compose up -d

After starting containers you can test the Api at:

http://localhost/api/

Code Building

Golang is a compiled programming language so to make any changes to your app, you need to build the executable again. In this repo the build process is done inside the docker-build process. So when you need to re-compile the code you can follow this steps:

  • docker-compose down
  • docker-compose build
  • docker-compose up -d

To simplify this steps you can create a makefile and group this commands in a single one, or on *nix system you can use this version of the commands:

docker-compose down && docker-compose build && docker-compose up -d