Build a docker container with Github actions and deploy it on SquareScale

As a prerequisite, it is necessary to have some infrastructure deployed on SquareScale. Read the UI or CLI version. Why use Github actions? Simply because it’s integrated with Github. And it’s very simple to set up. Witch steps to build and deploy Have a Dockerfile Manage your source on Github Have an account on Docker Hub Add a repository for our containers Github action build image, push on DockerHub Schedule an update on SquareScale Take a nginx server redirects as simple example Create a repository on DockerHub:

Deploy high availability static sites on SquareScale with the CLI

We cover the CLI part, but you can read the UI version to understand what we do. Prepare your infrastructure on SquareScale First steps are in the UI (exactly the same as the previous article). Go to https://www.squarescale.io/ and login. Create an organization: It now appears on the home page: Open the new organization and add AWS credentials to it: SquareScale need: Programmatic access to an account With “AdministratorAccess” policy attached The “Access key ID” & “Secret access key” generated in IAM console The “Account ID” Put their information here (the name is only a reference inside SquareScale UI):

Deploy high availability static sites on SquareScale

Why deploy static sites on SquareScale? You want to be able to quickly deploy your static sites, have control over their generation. But above all you want to be able to scale in case a peak load occurs. SquareScale will help you to do all this. In this article we will deploy a 3 nodes cluster on AWS. Then deploy the following URLs in 3 containers distributed in different datacenters to compensate for possible server or datacenter failures: