Added Javascript endpoints and systemd service example

This commit is contained in:
Stephanie Sunshine
2022-01-04 13:16:53 -08:00
committed by George Shammas
parent a5adaf7e50
commit 984be2f57e
2 changed files with 37 additions and 4 deletions

24
web-service.systemd Normal file
View File

@@ -0,0 +1,24 @@
[Unit]
Description=ifconfig.io web service
ConditionPathExists=/opt/ifconfig.io
After=network.target
[Service]
Type=simple
User=root
Group=root
Environment="GIN_MODE=release"
Restart=on-failure
RestartSec=10
startLimitIntervalSec=60
WorkingDirectory=/opt/ifconfig.io
ExecStart=/opt/ifconfig.io/server
PermissionsStartOnly=true
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=web-server
[Install]
WantedBy=multi-user.target