Comment on page
Build & Deploy
Once a feature is added, a bug is fixed or a configuration adjusted, you may want to deploy the latest version of your code online. At Artifakt, we use containerization. It means we bundle your applications together with all of their related dependencies, libraries, and configurations files required for them to run.
Two options are possible to deploy your code:
The build process defines what happens when building your application and creates the necessary container image. The deploy process pulls the container image and starts live containers, replacing the previous version, with no interruption, using a blue-green deployment pattern.
If your application has a build step that you would like to run, you can use a
build.shscript located in an
.artifakt/folder in the root folder of your project (note the
.in front of artifakt).
Similarly, you can also use an
entrypoint.shfile in the
.artifakt/folder to override some configuration. If it exists, the
entrypoint.shscript will be executed just before the default process. It is ideal to make last minute checks, db migrations, quick cache reset, etc.
There is a performance penalty at startup in putting too many commands in the
entrypoint.sh. Please consider using
build.shas much as possible.
Below you can find a summary of the available callbacks and when they are executed:
After this Build & Deploy procedure, the code is deployed in a container runnning on each server of the stack.
The /mnt/shared directory is mounted on the container on the /data directory so that data can be transmitted to the container.