Customizing Deployments

All Squash APIs are currently not available for accounts under the free plan. For more details please go to our plans page. See API Authentication before starting with the API calls below. You can start any Squash deployment by using the API calls described in this page. We will list below each API call in detail as well as some API request samples. Start a Deployment URL format: https://api.squas...

Read more

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 containe...

Read more

Squash has native & first-class support for Dockerfiles and Docker-compose. Using the Squash Deployment UI The best way to start testing your first deployments is by using the Squash deployment interface, this interface will guide you through a few steps and questions in order to get your deployment up and running. Automatic Docker detection By default we will attempt to detect a Dockerfile or doc...

Read more

When you start a new deployment Squash will perform the following steps in this order below. You may also check this quick intro on how Squash works. Finding a Build plan Squash first searches for a Squash YAML file. If the file is not present then it checks if there is a deployment profile defined in the Squash Deployment interface. If the above fails, then it searches for: ./Dockerfile at the ro...

Read more

Note: You may customize the success routing logic by using the success_response_check field. Squash uses any of the HTTP response codes below in order to recognize a success response from the application running in the Docker container: 200 401 300 301 302 When one of these status codes is received, Squash will update its internal routing table and start redirecting the requests to the deployment’...

Read more

You can define a .squash.yml at the root level of your repository. This file provides greater flexibility to control the build and execution of each deployment. Squash works out of the box without the need of a .squash.yml file. In this case Squash searches for a Dockerfile or docker-compose.yml file within the root path of your application code. More detail on the deployment build process. Troubl...

Read more

Custom Environment Variables You can define custom environment variables from the Squash admin interface. Go to Settings -> Repositories and then click on “Settings” for a given repository. Each environment variable defined on this page will become available within the deployment host. They can also become available within docker containers with a few configuration steps (see below). Using environ...

Read more

Squash provides custom HTTP headers that are always send to the applications running within Squash deployments. These headers provide users with more flexibility at the web server level. Squash-Server This header always have the value true and is used to signal to applications that the request is coming from Squash. This is handy if you need to perform certain checks/operations that are meant to b...

Read more

All Squash APIs are currently not available for accounts under the free plan. For more details please go to our plans page. After submitting API calls it may take from 1 to 3 minutes for the changes to be fully propagated. This depends on the number and size of the files updated within the assets folder. Upload file Please note that you need to use the separate "create folder" API first (see below...

Read more

All Squash APIs are currently not available for accounts under the free plan. For more details please go to our plans page. This API call will start a new deployment to force a Deployment Cache (DC) update. Squash will update the cache during the shutdown process of the deployment. This is useful for relatively large applications using dynamic data in Dockerfiles, such as database dumps and other ...

Read more

Squash offers three types of user accounts: Admin Technical Admin Member Admin Role This is the default role for the first user in a personal or organization account. Admins have full access to the account, including billing. Technical Admin This role has the same access as Admin, except billing. Member Members have access to the the following areas: Deployments page Historical deployments page Ca...

Read more

Available VM sizes Click here for a complete list of the available VM types, including memory, storage and CPU. Changing VM sizes You can configure the right amount of memory, vCPU and storage to tailor your needs. Every application is different and Squash gives you flexibility to change these settings in multiple levels. Account Level This gives you a default VM size that is used across all repos...

Read more

For reference, here is how Squash handles subdomains and multi-level subdomains. Subdomain port mapping is a great way to define HTTP endpoints for microservices to facilitate the communication between apps and APIs. This feature works for Dockerfiles, docker-compose and any apps without Docker. Example using Docker For this example we will use a repository with the following file: src/CRM/docker-...

Read more

You can customize a Squash PR comment to list different applications, subdomains and URL arguments. You may also restrict the visibility of this automatic comment based on changes in certain folders (see below). Listing Multiple Applications See this page for more details on repos with multiple applications. Listing Subdomains Squash has built-in support for subdomains and multi-level subdomains. ...

Read more

The Deployment Cache (DC) is a good way to speed up the build process of deployments. This feature is enabled by default on all repositories. Squash generates a cache snapshot for the following types of apps, across all branches in a repository: A Squash YAML file, in case you are not using Docker Each unique Dockerfile or docker-compose file This is done by keeping a md5sum reference of each file...

Read more

When the Assets Storage is enabled Squash will automatically add a new /assets/ mount point for all deployments within the repository. Using the copy_files_build_process feature in the YAML file Here you would manually copy files or folders within the build process defined in the .squash.yml file. This will essentially transfer data from the assets folder to a different location within your source...

Read more

Back to the Squash YAML file page. The YAML fields below are supported on YAML based (non-Docker) deployments only. build_steps Defines a list of steps that should be executed in order to prepare the environment. Such steps may include package installations, DB initialization and should not include commands that start any kind of services. It’s possible to specify Docker instructions for those com...

Read more

Squash makes it very easy to seed development databases. You can use your own sanitized data set or even clone production dumps (although in some cases this might not be recommend, see below). The way it works is based on importing a development db dump from any SQL or non-SQL database engines (MySQL, PostgreSQL, MongoDB, etc) and then caching that data into Squash so that you don't need to do a f...

Read more

Please note that the steps below are only required for private repositories. By default Squash uses OAuth access tokens from the hosted Version Control System provider (GitHub, Bitbucket or GitLab) in order to fetch a branch's code during a Squash deployment. We do this in order to keep the amount of permissions on each provider down to a minimum and avoid requesting for any admin permissions. Thi...

Read more

This feature is currently not available for accounts under the free plan. For more details please go to our plans page. Squash can automatically start new deployments based on each commit and act similar to a Continuous Integration (CI) system. This gives you the power to check if a Squash build is successful and returning a success response for a given commit. You may also automatically run speci...

Read more

This feature is currently not available for accounts under the free plan. For more details please go to our plans page. Squash supports linking apps/microservices from multiple code repositories. This facilitates the deployment of complex apps with multiple microservices living in separate repositories. You may also define dependencies such as a database service running on its own VM or any type o...

Read more

Host OS and installed packages The host virtual machine where we deploy your Docker containers comes with an absolute minimum list of handy tools. These are not meant to be extensive since you can fully customize the environment within a Docker container to fit your needs. Host environment details: Operating System: Amazon Linux 2 (CentOS based) Tools: Git 2.x Telnet docker docker-compose make cUR...

Read more

You can define custom actions in the Squash YAML file. These are custom commands that will be executed inside your application's container or within the host VM itself. When you define a custom action it will appear in the Deployment settings page, as a new item within the "Actions" dropdown. This is an easy way to quickly run routine/common tasks inside a Squash deployment without the need of hav...

Read more

Squash supports multiple applications within the same repository. You can test each app independently off its own virtual machine. You can also define custom PR comments with unique deployment links for each application. This works for apps based on Docker or without it (Squash YAML file based). Example using Docker/docker-compose The Squash YAML file sample below shows two separate applications w...

Read more

Back to the Squash YAML file page. The YAML fields below are supported on any application type (Docker or non-Docker based). allow_public_ports This will open in the firewall one or more ports for external access. Squash by default restricts external access to all ports running on deployment VMs except the SSH port and ports used by the actual deployment endpoints (443). Mandatory field: No Data T...

Read more

Back to the Squash YAML file page. The Docker based build process Here is a sample of a Squash YAML file with two applications within the same repo. Each application requires its own Dockerfile or docker-compose file. deployments: CRM: filename: ./src/crm/Dockerfile context_path: ./src vm_size: 1GB CoreApp: filename: ./src/coreapp/docker-compose.yml context_path: ./src vm_size: 2GB Supported YAML ...

Read more

Squash has native support for self-hosted GitLab instances, all Squash features are available in this integration. To get start first go to the Squash Sign up page, click on "Signup with GitLab" and then "GitLab Self-hosted" in the next page. Then click on the highlighted link to setup your GitLab access: The next step is to register Squash within your GitLab instance by following the steps below....

Read more

Squash supports launching service based deployments without an HTTP end point. This is helpful if you want to spin up a read-only database or any services that you want to share with one or more feature deployments. This is currently only supported within the Squash YAML file. How it works First you need to define one or more services within the Squash YAML file, see examples below. Each non-HTTP ...

Read more

Squash supports applications made of several microservices defined within separate repositories. There are currently three ways to get such apps running in Squash: Using the deployment dependencies feature. Squash creates a unique VM for each independent repository and attach them all together through environment variables. This requires very little setup. You may also share one or more microservi...

Read more

Tech Stack Examples Python NodeJS PHP Ruby Java TypeScript Go Basic example - using a Dockerfile For this first example we have a web app defined in a Dockerfile, this web app has an HTTP service running on port 3000 and we are using the port_forwarding field to properly tell Squash to route traffic to this port. deployments: MyApp: filename: ./src/Dockerfile context_path: ./src port_forwarding: #...

Read more

This feature is currently not available for accounts under the free plan. For more details please go to our plans page. Squash allows you to define multiple pipelines to handle the most complex use cases for executing automated scripts and even shipping code to production environments. Use cases Run all your unit tests, regression/functional tests using any framework. Automatically ship changes to...

Read more

Squash has a built-in Docker Registry that you can use to easily store and retrieve Docker images from your applications. How it works When Squash builds a new version of your app it will automatically create a new image and push it to the registry, if the build is successful. New subsequent builds will automatically use the latest image for caching purposes. Squash still builds a new image from s...

Read more

If you are using Docker or Kubernetes you can check specific instructions for these at the bottom of this page. Building and running Python based apps is quite straightforward in Squash. There are basically three elements to accomplish this: Pick the base OS image from Docker Hub, this is usually a flavor of a major distribution (Ubuntu, CentOS, etc) or a basic image tailored for your specific pro...

Read more

If you are using Docker or Kubernetes you can check specific instructions for these at the bottom of this page. Building and running NodeJS based apps is quite straightforward in Squash. There are basically three elements to accomplish this: Pick the base OS image from Docker Hub, this is usually a flavor of a major distribution (Ubuntu, CentOS, etc) or a basic image tailored for your specific pro...

Read more

If you are using Docker or Kubernetes you can check specific instructions for these at the bottom of this page. Building and running PHP based apps is quite straightforward in Squash. There are basically three elements to accomplish this: Pick the base OS image from Docker Hub, this is usually a flavor of a major distribution (Ubuntu, CentOS, etc) or a basic image tailored for your specific progra...

Read more

If you are using Docker or Kubernetes you can check specific instructions for these at the bottom of this page. Building and running Java based apps is quite straightforward in Squash. There are basically three elements to accomplish this: Pick the base OS image from Docker Hub, this is usually a flavor of a major distribution (Ubuntu, CentOS, etc) or a basic image tailored for your specific progr...

Read more

If you are using Docker or Kubernetes you can check specific instructions for these at the bottom of this page. Building and running Ruby based apps is quite straightforward in Squash. There are basically three elements to accomplish this: Pick the base OS image from Docker Hub, this is usually a flavor of a major distribution (Ubuntu, CentOS, etc) or a basic image tailored for your specific progr...

Read more

If you are using Docker or Kubernetes you can check specific instructions for these at the bottom of this page. Building and running Web apps on any stack is quite straightforward in Squash. There are basically three elements to accomplish this: Pick the base OS image from Docker Hub, this is usually a flavor of a major distribution (Ubuntu, CentOS, etc) or a basic image tailored for your specific...

Read more

If you are using Docker or Kubernetes you can check specific instructions for these at the bottom of this page. Building and running TypeScript based apps is quite straightforward in Squash. There are basically three elements to accomplish this: Pick the base OS image from Docker Hub, this is usually a flavor of a major distribution (Ubuntu, CentOS, etc) or a basic image tailored for your specific...

Read more

If you are using Docker or Kubernetes you can check specific instructions for these at the bottom of this page. Building and running Web apps written in Go is quite straightforward in Squash. There are basically three elements to accomplish this: Pick the base OS image from Docker Hub, this is usually a flavour of a major distribution (Ubuntu, CentOS, etc) or a basic image tailored for your specif...

Read more

There are two easy ways to greatly speed up the build and startup time of web apps in Squash. Besides improving the user experience, fast startup times allow you to reduce the expiration time of your deployments, which will lead to significant cost savings. Using the Deployment Cache First check if the Deployment Cache feature is enabled for your repositories. This feature can speed things up a bi...

Read more

Squash supports the native Docker Secrets functionality. This allows keeping any sensitive environment variables out of the Docker image. Using this feature is simple and requires just a few steps that need to be added within the Squash YAML file. The build_options field is required and the --secrets flag must be present. Example: build_options: --no-cache --secret id=sqenv,env=MYSECRET id argumen...

Read more