Set a release command
You can set it in two places:- In the Environment step of Deploy App, so it runs on the very first deploy.
- In your app’s Settings tab, under Release Command. Click Save, and it runs on the next deploy.
Only use a suggestion if it matches your project.
When it runs
During a deploy, after the new image has reached your server:1
Release command
Symplax runs your command in a one-off container from the new image. It gets the same environment variables, volumes and network as your app, so it can reach your Symplax databases. The container is removed when the command finishes.
2
New version starts
Only if the command succeeded, Symplax starts the new version alongside the old one.
3
Health check and swap
The new version is health checked, then swapped in. See Zero-downtime swap.
If it fails
A release command fails if it exits with a non-zero code or runs longer than 300 seconds. Then:- The deploy stops. The new version is never started.
- Your previous version, if there is one, keeps serving traffic.
- The deploy is marked failed, with the command’s output in the deploy log.
Reading its output
The command’s output appears in the deploy log, up to 200 lines. Symplax also reads it for signs of trouble:- It printed nothing: Symplax warns you, in case the command does not exist in the image.
- It exited with
0but printed errors, such asERROR,not foundorNo migration: the deploy continues, and Symplax tells you to check the output before trusting the deploy.
Details
- The command runs with
sh -c, bypassing your image’s own entrypoint. Chain steps with&&. - It runs on every deploy, including auto-deploys from a push. Make it safe to run more than once, as migration tools normally are.
- It does not run on a rollback.
- It works for apps from GitHub, from a Docker image, and from the marketplace. Most marketplace apps run their own migrations when they start, so they rarely need one.