First you need to get the slack api token for your bot. You have two options:
- If you use a bot user integration of slack, you can get the api token on the integration page.
- If you use a real slack user, you can generate an api token on slack web api page.
You need to configure the API_TOKEN
in environment variable.
docker-compose.yml
version: '3'
services:
slackbot:
image: okwrtdsh/slackbot:latest
environment:
- API_TOKEN="YOUR_API_TOKEN"
docker-compose up -d
See the slackbot's README.
You just place your scripts in /app/plugins
.
docker-compose.yml
version: '3'
services:
slackbot:
image: okwrtdsh/slackbot:latest
volumes:
- ./example/hello.py:/app/plugins/hello.py
environment:
- API_TOKEN="YOUR_API_TOKEN"
If you need other libraries, you can use your requirements.txt.
docker-compose.yml
version: '3'
services:
slackbot:
image: okwrtdsh/slackbot:latest
volumes:
- ./example/hello.py:/app/plugins/hello.py
- ./requirements.txt:/requirements.txt
environment:
- API_TOKEN="YOUR_API_TOKEN"