Created
December 29, 2018 21:50
-
-
Save pmatseykanets/13d0efd9b77370eac587fcdf9f7bb211 to your computer and use it in GitHub Desktop.
Systemd config for a Go app
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
[Unit] | |
Description=App Name | |
After=network.target | |
[Service] | |
EnvironmentFile=-/usr/local/app/.env | |
ExecStart=/usr/local/app/current/app | |
WorkingDirectory=/usr/local/app/current | |
User=nobody | |
Group=nogroup | |
ProtectSystem=yes | |
AmbientCapabilities=CAP_NET_BIND_SERVICE # lets `nobody` user bind ports 80, 443 | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment