Created
July 30, 2024 20:33
-
-
Save technosophos/f2b5ff9bc28f097423ccf0cb3c9188f1 to your computer and use it in GitHub Desktop.
Ubuntu service for running Spin as a daemon
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Put this file in: /etc/systemd/system/spin.service | |
# then run | |
# systemctl enable spin | |
# systemctl daemon-reload | |
# systemctl start spin | |
[Unit] | |
Description = Spin application | |
After = network.target | |
[Service] | |
Type = simple | |
ExecStart = /usr/local/bin/spin up --from ghcr.io/technosophos/my-spin-app --listen 0.0.0.0:80 | |
# For anything but testing, User and Group should be single-purpose Spin users. | |
User = root | |
Group = root | |
Restart = on-failure | |
RestartSec = 5 | |
TimeoutStartSec = infinity | |
[Install] | |
WantedBy = multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment