You can customize the deployment process with two hook files "deploy.sh" and "pre_deploy.sh" located in a directory "artifakt" at the root of your code.
In case you defined in Artifakt a custom root code (e.g. /src/) so your hook file should be located in "/src/artifakt/deploy.sh".
These files are executed during the deployment process by the webserver user (apache) :
- pre_deploy.sh : executed just after the code is deployed in the new release (before running any custom deployment script for your application),
- deploy.sh : executed at the end of the deployment (after running any custom deployment script for your application).
In these two files, you can access to any environment variables defined in Artifakt. For example, if you have defined a variable called CURRENT_ENV you can access to this variable using this code : $CURRENT_ENV.