The VM Build Process

When you start a new deployment Squash will perform the following steps in this order:

  • Squash will first evaluate if it can find a Dockerfile or docker-compose.yml file at the root path of the application’s code. If it can’t find it, then it will look for a .squash.yml at the root path and parse it.
  • Start a new clean virtual machine built from scratch.
    • By default all deployments will use the test-instance user account, located at /home/test-instance.
  • Attach a Docker cache volume if enabled for the repository. This will replace the / mount point with a snapshot from a previous build. See Docker Cache
    • NOTE: If Persistent Storage is enabled for this branch/deployment Squash will not use a Docker Cache volume.
  • Attach the /assets/ volume if enabled for the repository. See Assets Storage
  • Pull your code from GitHub.
    • Your code is stored under /home/test-instance/code
    • NOTE: If Persistent Storage is enabled for this branch Squash will not pull a new version of the application’s code.
  • Then Squash will run docker build or docker-compose build for the code located at /home/test-instance/code.
    • NOTE: The build process will be skipped if Squash uses a Docker Cache volume or if Persistent Storage is enabled for the branch/deployment. Squash assumes in this case that the Docker image has been built to speed up the process.
  • If the build succeeds, then Squash will run docker run or docker-compose up
  • Squash will then listen for a success response success response at the defined HTTP port. 80 by default unless defined in the .yml file.
  • After receiving a success response Squash will update its routing table and redirect all traffic to the web app running in the deployment, the standard loading page will no longer be displayed.