We have a few custom services running on our services, custom in the sense that they are programmed from scratch and continually developed. This deployment-system allows us to test, ship new code, and restart the service automatically.
Our deployment-system is a set of custom bash-scripts which run on our server and are triggered from github, where we store our code.
The deployment is triggered at the end of a successfully run testing chain which is built with github actions.
In order to explain the deployment chain we will bring forth all the steps needed to deploy a new service with this system.
In your repository go to tab Actions and setup the Deploy to Angrezi Servers workflow.
You dont need to change anything here but can add further steps to this workflow for example to build and test your application.
Our deployment expects a
.environment folder to be present in the root folder of your repository.
This folder contains all files which are bound to angrezis server environment.
Usually systemd-service files, other configuration and a deploy script are situated here.
Create a file
This file well be automatically called at the end of a successful github-action workflow. You have access to a few environment variables in your script:
# accessible var DEPLOY_DEST
# accessible var DEPLOY_FROM
Log in to server.radioangrezi.de and run
sudo setup-service [service-name] .
this will copy all the environment-files into
/opt/services/[service-name] and symlink a few known configuration files automatically.
.service will be linked and enabled as a systemd service. .monit-conf will be linked as a monit config file.