Skip to content

Instantly share code, notes, and snippets.

@kkroesch
Last active October 30, 2023 13:51
Show Gist options
  • Save kkroesch/0a8931d15ffc7fbe945d0a25d77b873c to your computer and use it in GitHub Desktop.
Save kkroesch/0a8931d15ffc7fbe945d0a25d77b873c to your computer and use it in GitHub Desktop.
Example systemd config for web application
a# /etc/systemd/system/webconsole.service
#
# Install with:
# # install https://github.com/yudai/gotty
# # systemctl daemon-reload
# # systemctl enable --now patchstatus.service
#
[Unit]
Description=Provide an ephemeral container with web console
After=network.target
[Service]
User=karsten
Group=karsten
WorkingDirectory=/var/webconsole
ExecStart=/usr/local/bin/gotty -w podman run -it --rm busybox
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment