Web server in golang for testing deployements.
All actions are executed as root.
cp goweb.service /etc/systemd/systemThis step must be repeated on each change.
systemctl daemon-reload# start the service
systemctl start goweb.service
# show service status
systemctl status goweb.service
# see logs
journalctl -u goweb --followsystemctl enable goweb.service# Make the app crash
curl http://localhost:8080/panic
# Wait ~5sec
# The service must be UP
curl http://localhost:8080/hello- Systemd directives documentation
- Info about the DynamicUser=yes directive