peachhub-provider
a hosted Scuttlebutt pub-as-a-service provider
DEMO
table of contents
start
before you start, please
- install
node@8
andnpm@5
- install
git-lfs
- install and set up Postgres for your system
- create a database in Postgres named
peachcloud_provider_development
(see Postgres DEV setup) - install Redis
git clone [email protected]:peachcloud/peachhub-provider
cd peachhub-provider
npm install
npm run sql migrate:latest
npm run sql seed:run
npm run dev
design
ux
- join
- land
- sign in
- create pub
- pay for pub
- start pub service
- monitor
- land
- sign in
- view pub
- see stats
- command
- land
- sign in
- view pub
- run command
data models
- users
- id
- name
- pub
- bots
- id
- userId
- name
- status (up, down, none)
- stats
- stream Docker stats
- commands
- relay commands to pub services
- orchestrator
- on schedule, check what pubs are up
- have 1 pub per 1 GB memory, 1 hub per 15 GB memory
- queue worker jobs to ensure correct swarm
- bots
- payment
- products
- plans
- customers
- subscriptions
architecture
- web server
- swarm worker
- mailer worker
- pub service(s)
stack
- web server
- web app
- swarm worker
- mailer worker
- node-resque
- nodemailer
- third-party: sendgrid
- dev tool: maildev
folder structure
we're following the dogstack folder structure convention, adapted for our stack.
available scripts
npm start
starts production server
npm start
npm run dev
starts development server
npm run dev
npm test
TODO runs ava
tests
Can optionally take a glob
npm test -- './todos/**/*.test.js'
Default glob is ./**/*.test.js
ignoring node_modules
npm run lint
checks for standard style
can optionally take a glob
npm run lint -- './todos/**/*.js'
default glob is ./**/*.js
ignoring node_modules
npm run sql
runs knex
command, with any arguments.
npm run sql migrate:latest
npm run sql seed:run
notes
After deploy: migrate on heroku!
heroku login
heroku run npm run sql migrate:latest --app=peachcloud-demo
Postgres DEV setup
use a ~/.pgpass
file to automate your passwords!
echo "localhost:5432:*:postgres:password" > ~/.pgpass
chmod 600 ~/.pgpass
create your database with:
createdb peachhub_provider_development -h localhost -U postgres
drop your database with:
dropdb peachhub_provider_development -h localhost -U postgres
connect to your database with:
psql -h localhost -U postgres -d peachhub_provider_development
background image
https://pixabay.com/en/love-heart-set-seamless-pattern-3102033/
- search terms
- seamless
- tile
- repeating
- geometric
- abstract
- mosaic
- open source friendly websites
- pixabay.com
emoji
increase file watch
if you get an ENOSPC
error related to watching files in development:
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
css selector chart
The css selectors that look like :contains("text") dont work, i googled it, apparently that kind of selector is a jquery thing
๐คท
license
AGPL-3.0