Deployment Environment

Squash runs your deployments on virtual machines that are commissioned exclusively for you. Each deployment is created from scratch with a clean state.

Docker containers

Each Squash deployment has at least one Docker container (multiple containers if you are using docker-compose). Even if your application setup is based on a .squash.yml file (no Docker files) Squash still creates a Docker container behind the scenes.

SSH Access

Every Squash deployment has a SSH endpoint allowing you to debug complex issues and perform updates to your environment and application.

Once you connect to a Squash deployment you will encounter this screen:

For more information please go to Squash SSH access.

squash-docker-shell

You can quickly connect to containers used by your application by accessing the squash-docker-shell utility. After executing this command:

  • Squash will automatically attach to a container, if there is only one container running in the host VM.
  • Otherwise Squash will display a prompt like the one below, listing all available containers. Note that Squash assigns a unique incremental ID to each container (see the first column below). To connect to your desired container just type in the ID of the container you wish to connect to.
  • By default Squash uses “bash” as the standard shell when connecting to containers. You may also pass a different shell name as follows:
    • squash-docker-shell <shell name>
    • Example: squash-docker-shell sh
  • You may also connect to containers by using the container name as follows:
    • squash-docker-shell cname=<container_name>
    • Example, using the first container listed below:
      • squash-docker-shell cname=code_web_1
    • Please note that this is the container name (last column below), not to be confused with the container ID.

Once inside a container you have full access to install packages and customize your application environment as needed.

squash-storage-usage

This commands lists storage details directly from Docker, including the storage used by containers or any images. Use the following command to see the list of options: squash-storage-usage  -h

squash-docker and squash-docker-compose

These are low level commands serving as replacements to the docker and docker-compose commands. They will accept most arguments from their counterpart commands. Most of the time you should use squash-docker-shell instead.

Examples:

  • $ squash-docker ps
  • $ squash-docker-compose logs

Please note that when calling these commands within a script you need to explicitly call them with “sudo”. Example:

#!/bin/bash

# tail removes the `first line that is only useful for debugging
DOCKER_CONTAINER_ID="$(sudo squash-docker ps -qf 'name=website' | tail -n +2)";
sudo squash-docker exec -it "$DOCKER_CONTAINER_ID" python manage.py migrate

Docker and docker-compose restrictions

Please note that squash-docker-shell (and also squash-docker and squash-docker-compose) serves as a replacement for directly using the “docker” or “docker-compose” commands. Due to security reasons these commands are not allowed within the Squash host VMs.

Host OS and built-in software

Please check out this page for more details.