Hubot brain persisted to PostgresDB as JSONB
npm install hubot-postgres-brainbased on the original first pass script by Dan Thompson of Github(?) https://github.com/github/hubot-scripts/blob/master/src/scripts/pg-brain.coffee
CREATE TABLE hubot (
id CHARACTER VARYING(1024) NOT NULL,
storage JSON,
CONSTRAINT hubot_pkey PRIMARY KEY (id)
)
INSERT INTO hubot VALUES(1, NULL)
DATABASE_URL: the postgres connection string or URL. e.g., 'postgresql://dbuser:secretpassword@database.server.com:3211/mydb'DATABASE_SSL: set to 1 to enable Postgres SSL mode, which has been known to help with deployments on herokuHUBOT_BRAIN_SAVE_INTERVAL: The save interval in minutes (defaults to 15 minutes)1. Heroku offers Postgres as a free add-on. Although Redis is also free, it requires a credit card for "Validation". It seems, however, that the free dynos and Postgres Databases do not.
2. 1GB max size per TEXT/JSON field, even on the Heroku hobby-dev free tier. Whereas the Redis free-tier offers 25MB.
3. If you deploy it yourself, Redis actually takes extra steps during setup for its data store to survive a reboot (its key-value store is in memory just like hubot's robot brain)