Search…
⌃K
Links

Static service deployment

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

What is a static service?

Applications created in Release can have multiple 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

Your application may have more than one web server, each running as its own service in its own container, but all these containers are doing is building static assets (like HTML, Javascript, or CSS) and serving them over HTTP/HTTPS.
Running these types of services is common, and running them inside a full-blown Docker container may not be ideal. It may be preferable for your assets to be in 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 eligible for static service deployment. A repository can have any number of 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 repository and a directory. Release then checks the repository to see if it 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 using static service deployment.
If you choose to use static service deployment, Release only requires your build commands and your build directory.

Adding environment variables

In the "Advanced" section of the Create New Application 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.