Process management writtern by golang, inspired by python-supervisor
I have been using python-supervisor for many years and there are something uncomfortable feelings.
supervisorctl reloadwill cause supervisord restarted
Web control page
HTTP Basic auth
Single log page, include search support
Go version at least
The fastest way is run with.Default install location is
/usr/local/bin, change env-var
BINDIR will also change install location.
curl https://raw.githubusercontent.com/codeskyblue/gosuv/master/get.sh | bash
Or just download binaries
Thanks to goreleaser which makes publish binaries automaticly.
go get -d github.com/codeskyblue/gosuvcd$GOPATH/src/github.com/codeskyblue/gosuv go generate # package html resources into gogo build -tags vfs
After you installed gosuv, the first thing is to start server.
$ gosuv status PROGRAM NAME STATUStest running test_again stopped $ gosuv stop test$ gosuv start test
Open web http://localhost:11313 to see the manager page.and follow the gif to add a program to gosuv.
Default config file stored in directory
$HOME/.gosuv/, Set env-var
GOSUV_HOME_DIR can change config file store directory.
programs.ymlcontains all program settings.
config.ymlcontains server config
config.yml can be generated by
server: httpauth: enabled: true username: admin password: admin addr: :8083 name: 10.10.99.177 master:"" notifications: dingtalk: groups: - secret: c1b8032******************aa736a mobile: -"153********" client: server_url: http://admin:admin@localhost:8083
master 的支持来自 https://github.com/ihaiker/distributed-gosuv Logs can be found in
Edit config file(default located in
$HOME/.gosuv/programs.yml ) and run
gosuv reload will take effect immediately.
HTTP is follow the RESTFul guide.
Get or Update program
Add new program
Only 4 states. ref
- demo-program: command: ...notifications: pushover: api_key: [token]users: - [user1] - [user2]
Now only support pushover, and only status change to fatal will get notified.
This is feature that will helps update your deployment environment once your updated in the github.
This part is set in the
programs.yml, take look the example
- demo-program: command: python app.pydirectory: /opt/demowebhook: github: secret: 123456command: git pull origin master