Static Service Deployment

The simplest, cheapest, and most performant way to deploy your frontend.

What is a Static Service?

Applications created in Release have one or more services. These services can be one of two types: A Docker Service or a Static Service.

A Docker Service is your standard service built using your Dockerfile. If you can run your service in a Docker container, we can run it in Release. This service type is the most common. However, there are situations where running a service inside a container is not ideal due to cost, performance, or complexity. This is where Release's Static Services step in.

Static Service Use Case

In your application, you may have one or more web servers, each running as their own service in their own containers, but all that these containers are doing is building static assets (like HTML, Javascript, CSS) and serving them over HTTP/HTTPS.

These types of services are common and running them inside a full-blown Docker container usually isn't ideal. CDNs offer a plethora of advantages and it would be preferred for your assets to live inside a CDN instead of a Docker container.

Behind the scenes, Release will analyze a selected branch in your repository and search for services that are Static Service Deployment eligible. A repository can have zero or more services that are eligible for this optimized deployment.

Why use static services

Advantages

Disadvantages

➕ Static assets are deployed to a CDN

➖ No container to control

➕ Smart cache invalidation

➖ Doesn't support server-side languages like PHP

➕ No dockerfile needed

➕ Minimizes cost, maximizes speed

➕ Out-of-the-box SSL

➕ Supports Isomorphic services*

How to use Static Asset Deployment

When you create a new application using Release's Create New Application process, you choose a repo and a directory. Release then identifies if this repo contains services that are eligible for Static Service Deployment. If Release finds eligible services, you are given the option of deploying them the standard way through a container, or to utilize Static Service Deployment.

If you choose to use Static Service Deployment, then Release only requires your build commands and your build directory. From there, Release will handle the rest!

Adding environment variables

During Create New Application, in the Advanced section of the app creation process, you are given the opportunity to add Build Arguments and Static Service Environment Variables. Values placed here are shared between the Docker build process and the Static Services.