LiveSwitch
Usage
Once you've got a Necroswitch server stood up somewhere:
- POST /api_keys { "email":"" }
- POST/switches { "api_key":"", "name":"", "timeout":"" }
- GET /switches?api_key=
Dependencies
- some sort of SQL db
- some sort of ActionMailer-compatible email delivery server
- Twilio account
Development
Running locally without Docker
- clone the repo
- run bundle
- set up a SQL db
- copy .env.sample to .env
- edit .env to accurately reflect your configs
- run source .env to load the configs
- run bundle exec rake db:create db:schema:load
- run bin/rails s
- visit localhost:3000
Running locally with Docker
- clone the repo
- run docker-compose up -d db
- run docker-compose run --service-ports api
- from inside the running container
- run rake db:create db:migrate
- run bin/rails s
Production
Deploy to Heroku
- clone the repo
- run heroku create
- run heroku addons:create sendgrid:starter
- run heroku config:set TWILIO_ACCOUNT_SID=
- run heroku config:set TWILIO_AUTH_TOKEN=
- run git push heroku master
- hit https://.herokuapp.com
Deploy with Docker Compose
TODO
-
How to run the test suite
-
Services (job queues, cache servers, search engines, etc.)
-
Deployment instructions