Skip to content

Repository files navigation

poll-bot

Dependencies

Setup

  1. clone repo
  2. insert .env and define x_TOKENID where MODE=X
# example .env
MODE=DEV
DEV_TOKENID="..."
  1. make to build image & setup bound data

Running the Bot

# docker image
make up

# or with local changes
make dev

Updating

  • the bot will check for updates on-startup and via webhook POSTs (if you set that up)
# add this to your .env to auto-update non breaking changes
REDEPLOY=1

# manually...
make update
make up     # to restart

Overview of Make

# using
make up     # start
make down   # stop

# updates
make        # for fresh clones
make update # this pulls first


# debug
make logs   # follow output live
make dev    # uses go run instead of docker, MODE=DEV

Hosting the web UI

The frontend compiles to a static SPA embedded into the Go binary, so a deployment is still one artifact and one process. Go serves both the pages and the API on SERVER_PORT.

make web    # compile the SPA into root/api/web/dist (go:embed reads it)
make dev    # then run; skip `make web` and you get a "not built" notice page

Releases build the frontend in CI, so the published binary already contains it.

About

all-in-one poll tracking bot, fitted with a RESTful web interface, cross-platform + access controls, and quick updates via a CI/CD

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages