Skip to content

jpmckinney/DataBeam

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DataBeam: Heroku

A fork of GSA/DataBeam to deploy to Heroku. Read its README. Note that CodeIgniter's /index.php and /application are copied to web/.

Set up

  • Create a new GitHub application
  • Copy the Client ID and Client Secret
  • Set the Homepage URL (e.g. https://myapp.herokuapp.com/)
  • Set the Authorization callback URL (e.g. https://myapp.herokuapp.com/auth/session/github)

Development

Install dependencies:

brew tap homebrew/php
brew install php55
brew install composer
composer install

Initialize the database:

mysql -u root -e 'CREATE DATABASE databeam'
mysql -u root databeam < sql/restdb.sql

Run a server (replace REPLACE):

GITHUB_CLIENT_ID=REPLACE GITHUB_CLIENT_SECRET=REPLACE ENV=development DATABASE_URL=mysql://root:@localhost:5000/databeam php -S 127.0.0.1:5000 -t web

Then, in another shell:

open http://127.0.0.1:5000

Deployment

Replace REPLACE:

heroku apps:create
heroku addons:create cleardb
heroku config:set ENV=production
heroku config:set GITHUB_CLIENT_ID=REPLACE
heroku config:set GITHUB_CLIENT_SECRET=REPLACE
heroku config:set ENCRYPTION_KEY=`base64 -b 16 /dev/random | head -1`
heroku config:set DATABASE_URL=`heroku config:get CLEARDB_DATABASE_URL`
git push heroku master

Then, initialize the database (replace REPLACE):

mysql -u REPLACE -p -h REPLACE REPLACE < sql/restdb.sql

Then, open the app:

heroku apps:open

Issues

  • File uploads probably won't work on Heroku
  • A package manager would preferably be used for CodeIgniter libraries
  • We may need to enable some PHP extensions on Heroku, e.g. sqlite3 and/or oauth

About

FORK Generic RESTful Interface for databases

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 50.1%
  • JavaScript 36.3%
  • CSS 13.3%
  • Other 0.3%