- Request a twitter oauth keypair (access token and consumer token, each with secret)
- Define the environment variables
CONSUMER_KEY
,CONSUMER_SECRET
,ACCESS_TOKEN
andACCESS_TOKEN_SECRET
- Set the environment variable
USER
to your own twitter @-handle - Set the environment variable
BOT_USER
to your bot's @-handle
- Mount
/app
- Edit
bots.rb
- Restart the container. The file is copied to the proper location, then, and executed.
- Mount
/ebooks/corpus
for persistent storage - The tweets are automatically fetched on container startup, if the environment variables for OAuth access are properly set
- The tweets are periodically fetched via cron
- Run
docker exec -it <container_name> /ebooks/import.sh
to fetch them manually, between the cron intervals
Mount /ebooks/<bot username>.json
to persist. Here, the bot will save a bookmark to save the last used tweet and reply. If you do not do this, the bot will work through all tweets from the beginning of time itself.