3 Manual deployment with virtual machines

 

This chapter covers

  • Creating and connecting to cloud-based servers
  • Understanding web server fundamentals with NGINX
  • Installing self-hosted Git repositories
  • Configuring and installing production web applications
  • Implementing background-running applications with Supervisor
  • Automating the deployment process with Git hooks
  • Securing our server by leveraging firewalls and SSH keys

In this part of our journey, we will manually deploy our code to a server. This involves uploading our code from our local computer to our server using just Git. Once the code is uploaded, custom scripts will be triggered to ensure that our server is updated with the latest version of our application. The process of sharing code safely to and from computers is exactly why Git is such an important tool and well worth mastering.

This process is similar to driving a vehicle with a manual transmission. Although it requires a bit more work, it’s an excellent opportunity to develop your skills before moving on to the automatic method. If you’re from the United States, you may be accustomed to driving an automatic transmission and find this idea strange. However, if you know how to drive a manual transmission, you might have a great appreciation of the value of learning the manual process before the automatic one.

3.1 Creating and connecting to a remote server

 
 
 

3.1.1 Provisioning a virtual machine

 
 

3.1.2 Connecting via SSH

 
 
 

3.2 Serving static websites with NGINX

 
 

3.2.1 Embrace ephemeral VMs

 

3.2.2 Modify the default NGINX HTML page

 
 
 

3.3 Self-hosted remote Git repositories

 
 

3.3.1 Log in to the server with SSH

 

3.3.2 Creating the bare Git repositories

 

3.3.3 Pushing local code to the remote repo

 
 

3.3.4 Git hook to check out code

 
 
 

3.4 Installing the apps' dependencies

 
 
 
 

3.4.1 Installing Python 3 and our FastAPI project

 
 

3.4.2 Installing Node.js and our Express.js app

 
 
 

3.4.3 Running the Express.js application

 

3.5 Run multiple applications in the background with Supervisor

 
 
 
 

3.5.1 Installing Supervisor

 
 

3.5.2 Configure Supervisor for apps

 
 
 

3.6 Serve multiple applications with NGINX and a firewall

 
 
 

3.6.1 Configuring NGINX as a reverse proxy

 
 
 

3.6.2 Installing Uncomplicated Firewall

 
 
 

3.7 Summary

 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage