Skip to content

Instantly share code, notes, and snippets.

@dioncodes
Created September 1, 2022 21:12
Show Gist options
  • Save dioncodes/4a7941800d4f944ba24122d5d1760585 to your computer and use it in GitHub Desktop.
Save dioncodes/4a7941800d4f944ba24122d5d1760585 to your computer and use it in GitHub Desktop.
Gin Go Backend System Service
[Unit]
Description=example-backend
[Service]
Type=simple
Restart=always
RestartSec=5s
ExecStart=/path/to/example/example-backend-linux-amd64
WorkingDirectory=/path/to/example
Environment="GIN_MODE=release"
[Install]
WantedBy=multi-user.target
@dioncodes
Copy link
Author

location e.g. /lib/systemd/system/example-backend.service

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment