Makefile and Docker Compose-based deployment

Until now, we have seen the manual deployment of a reverse proxy server (Nginx). Let's automate that by gluing things together. We are going to use a few tools, as follows:

  • Make
  • docker-compose

On Linux-based machines (Ubuntu and Mac OS X), Make is available as part of GCC (the C language toolchain). You can install docker-compose using the Python pip tool:

> sudo pip install docker-compose

On Windows OS, docker-compose is already available as part of Docker Desktop. Our goal is to bundle all deployable entities with one single Make command. Makefile is used to write control commands for the application. You should define a rule and the Make tool will execute it (https://www.gnu.org/software/make/manual/make.html#Rule-Example ...

Get Hands-On RESTful Web Services with Go - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.