Small tool for remote command execution via hook
Download binary from releases page
Make binary executable
sudo chown $USER:$USER rex
- Simply define 3 variables at
.env.rexfile (described below, example is provided at repo.env.rex.example). - Run binary with
./rex &ornohup ./rex & - Trigger command execution with GET-request
http://#host#:#REX_PORT#/ - Wait till end of execution and see stdout/stderr of command at response
- Profit
REX_USER - username used for basic auth
REX_PASSWORD - password used for basic auth
REX_COMMAND - command that should be executed (e.g: docker-compose restart webserver, date, ...)
REX_PORT - http webserver port
http://#host#:#REX_PORT#/health can be used as healthcheck of rex service (responses with 200 if service is up)