Plugin adding a /redeploy command, backed by a webhook
This plugin adds the following new env variables.
REDEPLOY_HOST=<>
REDEPLOY_TOKEN=<>
Section inspired by Devcordbot
Service installation: https://github.com/adnanh/webhook#installation
Env vars REDEPLOY_HOST
,REDEPLOY_TOKEN
,OWNER_GUILD
and BOT_OWNERS
need to be set
hooks.json
{
"id": "redeploy-mikmusic",
"execute-command": "/usr/bin/sh",
"pass-arguments-to-command": [
{
"source": "string",
"name": "/path/to/mikmusic/redeploy.sh"
}
],
"command-working-directory": "/path/to/mikmusic",
"trigger-rule": {
"match": {
"type": "value",
"value": "YOUR_SECRET_TOKEN",
"parameter": {
"source": "header",
"name": "Redeploy-Token"
}
}
}
}
redeploy.sh
#!/usr/bin/env sh
docker-compose pull && docker-compose up -d