I'm currently running multiple smaller web applications on a small scale server, and I set them up to be started and restarted with a systemctl service, I specifically made these apps a systemctl service so they automatically get started on system boot and restarted if they crash.
Now I want to also update and build the applications on the server once there is a newer version on the remote repository, the server itself can't check if there is a newer version available on the repository, the server also can't launch any scripts, and setting the systemctl service to launch a script would not restart the service again if it crashes, since the script would still be running.
How would I approach this problem correctly? Are there any tools that do this specifically?
Some other information:
- The applications are made in C#, with .Net 5.0
- The repository is a simple public one hosted on Github
My current folder structure is the following.
.
`-- applications
|
|-- application1
| |-- build/ (Binary started from service sits in here)
| |-- src/
| `-- application1.service
|
|-- application2
| |-- build/
| |-- src/
| `-- application2.service
|
`-- application3
|-- build/
|-- src/