Chapter 10. Deploying Go
This chapter covers
- Deploying Go web apps to standalone servers
- Deploying Go web apps to the cloud
- Deploying Go web apps in Docker containers
Now that you’ve learned how to develop a web application with Go, the next logical step is to deploy it. Deploying web applications is quite different from deploying other types of applications. Desktop and mobile applications are deployed on the end users’ devices (smart phones tables, laptops, and so forth) but web applications are deployed on servers that are accessed through a client (usually a browser) on the end users’ device.
Deploying Go web apps can be simple because the executable program is compiled into a single binary file. Also, because Go programs can be compiled into a statically linked binary file that doesn’t need any other libraries, they can be a single executable file. But web apps are usually not just a single executable binary; most often they consist of template files as well as static files like JavaScript, images, and style sheets. In this chapter we’ll explore a few ways of deploying Go web apps to the internet, mostly through cloud providers. You’ll learn how to deploy to