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 and Deploy job: the application source code has been modified and you need to build the application again before deploying it online.

  • The Deploy job: you just want to modify a few settings (example: environment variables) before redeploying the previously built application.

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.sh script 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.sh file in the .artifakt/ folder to override some configuration. If it exists, the entrypoint.sh script 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.sh as much as possible.

Below you can find a summary of the available callbacks and when they are executed:

Build Callbacks

If you use one of the callbacks (build.sh and entrypoint.sh), you become responsible for the runtime, in accordance with our Shared Responsibility Model.