Skip to content

feat: add Docker image with cron-based scheduled monitoring (Fixes #28)#39

Closed
lb1192176991-lab wants to merge 1 commit into
codegraphtheory:mainfrom
lb1192176991-lab:feat/docker-cron-28
Closed

feat: add Docker image with cron-based scheduled monitoring (Fixes #28)#39
lb1192176991-lab wants to merge 1 commit into
codegraphtheory:mainfrom
lb1192176991-lab:feat/docker-cron-28

Conversation

@lb1192176991-lab

Copy link
Copy Markdown
Contributor

What

Packages solana-rug as a Docker image with a built-in cron-like scheduler. Background monitoring without requiring an active terminal session.

Why

The CLI watch command requires an active terminal. A Docker container runs in the background on any VPS, NAS, or cloud server — making solana-rug deployable as an infrastructure component.

What's included

Dockerfile

  • Based on python:3.12-slim (~120MB base)
  • Installs solana-rug from source
  • Healthcheck: checks SQLite history file exists
  • SIGTERM/SIGINT graceful shutdown via trap

docker-entrypoint.sh

  • Reads WATCH_TOKENS (comma-separated mint addresses)
  • Configurable WATCH_INTERVAL (default: 300s)
  • Optional WEBHOOK_URL for HTTP alerts
  • Optional THRESHOLD score threshold
  • Persistent SQLite via /data volume mount
  • Iterates through watch list and sleeps between iterations

docker-compose.yml

  • Ready-to-use Compose file with restart policy and volume mount

Environment Variables

Variable Default Description
WATCH_TOKENS (required) Comma-separated mint addresses
WATCH_INTERVAL 300 Check interval in seconds
WEBHOOK_URL "" Optional webhook for alerts
THRESHOLD "" Score alert threshold
SQLITE_HISTORY /data/history.sqlite3 Persisted history path

Fixes: #28

@codegraphtheory

Copy link
Copy Markdown
Owner

Superseded by #48 (re-applied on latest main).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docker image with cron-based scheduled monitoring

2 participants