Sign inSign up

thunderysteak/everyhourbot

By thunderysteak

Updated about 3 years ago

A multiplatform bot that publishes an image post every hour. Powers Possumeveryhour.io.

Image
1

208

thunderysteak/everyhourbot repository overview

EveryHourBot

A bot written in NodeJS that powers @PossumEveryHour, supporting various social media platforms and cryptographic functionality for quality randomness.

Supported Platforms

Twitter
Mastodon
BlueSky

NOTICE: Breaking changes for Twitter!

With v2.0.0 of the bot, the whole codebase was heavily refactored, and the Twitter part has been replaced to utilise V2 API that is compatible with the Twitter Developer Free Tier. You will now need an Access Token that has Read and Write permissions.

You NEED to generate and set up OAuth 2.0 Client ID and Client Secret to grand Read and Write permission to your Access Token. If you don't set this up, you will either receive 403 or 401 HTTP error codes.

Code for the V1 API Twitter bot can be located under the v1.1.0-legacytwitter tag on Github releases.

Deployment Steps

There are two steps you have to perform before running the container:

1. Create Docker Volume and populate it with media

The bot requires images to run.

  1. Create a new volume:
docker volume create ehb_media
  1. Inspect it to get the path of where the volume is located
$ docker volume inspect ehb_media
[
    {
        "CreatedAt": "2023-06-25T22:52:09+01:00",
        "Driver": "local",
        "Labels": {},
        "Mountpoint": "/var/lib/docker/volumes/ehb_media/_data",
        "Name": "ehb_media",
        "Options": {},
        "Scope": "local"
    }
]
  1. Populate the folder you got from the mountpoint with images & read by everyone permission
  2. Run the container by mounting the volume to /ehb/media/
docker run --env-file=.env -v ehb_media:/ehb/media/ thunderysteak/everyhourbot:latest
2. Environment Variables

Before running the container, you need to populate the env variables with your automation credentials for each platform. An up to date env-example can be located in the Github Repository.

USE_MASTODON=true
MASTODON_SERVER=""
MASTODON_ACCESS_TOKEN=""

USE_BLUESKY=true
BLUESKY_SERVER="https://bsky.social/"
BLUESKY_EMAIL=""
BLUESKY_APP_PASSWORD=""

USE_TWITTER=true
TWITTER_CUSTOMER_API_KEY=""
TWITTER_CUSTOMER_API_KEY_SECRET=""
TWITTER_ACCESS_TOKEN=""
TWITTER_ACCESS_TOKEN_SECRET=""

DEBUG_MODE=false
ISDOCKER=true

You can pass the environment variables using .env file with --env-file=.env Full command:

docker run --env-file=.env  -v ehb_media:/ehb/media/ thunderysteak/everyhourbot:latest

Tag summary

Content type

Image

Digest

sha256:24614cc55

Size

58.8 MB

Last updated

about 3 years ago

docker pull thunderysteak/everyhourbot