Skip to content

9illes/go-web-systemd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sandbox Go web

Web server in golang for testing deployements.

Register systemd service

All actions are executed as root.

1. Installing the service descriptor

cp goweb.service /etc/systemd/system

2. Reload systemd daemon

This step must be repeated on each change.

systemctl daemon-reload

3. Start the service

# start the service
systemctl start goweb.service

# show service status
systemctl status goweb.service

# see logs
journalctl -u goweb --follow

4. Enable the service

systemctl enable goweb.service

Testing automatic restart

# Make the app crash
curl http://localhost:8080/panic

# Wait ~5sec

# The service must be UP
curl http://localhost:8080/hello

References

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published