codeforjapan/ha4go

Name: ha4go

Owner: Code for Japan

Description: ha4go

Created: 2016-07-14 23:56:26.0

Updated: 2016-07-14 23:56:28.0

Pushed: 2016-08-31 03:04:01.0

Homepage: https://kanazawa.ha4go.net

Size: 913

Language: Ruby

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

ha4go

????????????????

?????

Git, docker, Ruby, MySQL ??

????????????

clone https://github.com/codeforkanazawa-org/ha4go.git
a4go
le install --path vendor/bundle

.env ???????

ha4go??????????????????????????????? dotenv ????????????? cp .env.sample .env ?????????????????????????????????????(???????????????smtp?????????????????)

env.sample .env
.env

????????????????????????

BOOK_APP_ID=12341234
BOOK_APP_SECRET="hogehogehoge"
_SERVER='smtp.gmail.com'
_PORT=587
_DOMAIN='googleapps.domain'
_USER='notifier_user@googleapps.domain'
_PASSWORD='password_of_notifier_user'
HOST=localhost:3000
L_HOST=localhost

db???

?????? production ???? development ?????MySQL ????????

MySQL ??????

MySQL????????? init.sql ?????? db ? ha4go?????? ???????????? OSX ??????????

l.server start          # start mysql
l -uroot -p < init.sql  # create db & user
rt MYSQL_HOST=localhost # (or edit .env)
le exec rake db:setup   # setup database
Docker ?? MySQL ??????

????MySQL???Docker?root???????????????????????????????????

le exec rake -f Rakefile.deploy build[db]     # image build
le exec rake -f Rakefile.deploy run[db,DEBUG] # start mysql

??? Linux?? 127.0.0.1 ? docker-machine ip ? MySQL ?????????????????(127.0.0.1?????localhost ??????MySQL????? UNIX ??????????????????????????)

init.sql ?????? db ? ha4go?????? ?????????

rt MYSQL_HOST=127.0.0.1                    # or =`docker-machine ip`
l -uroot -p1234 -h$(MYSQL_HOST) < init.sql # create db & user
le exec rake db:migrate                    # migrate database

Facebook App ID ???

Facebook ?????????????(OAuth?????????)???????

Facebook Developers https://developers.facebook.com/

  1. ???? > My Apps > Add a New App
  2. ??????????????(www)????
  3. ?????????(ha4go-dev??)
  4. ????????????Create App ID ?ID??
  5. Quick Start???????????????????????????Next
  6. “Tell us about your website”
  7. Site URL: http://localhost:3000/
  8. Mobile Site URL: http://localhost:3000/
  9. ???? > My Apps?3??????????????????????????
  10. “App ID” ? “App Secret"???????? .env ? ???????????
BOOK_APP_ID={App ID}"
BOOK_APP_SECRET={App Secret}

SMTP ???

Gmail??????????????????????????????(Gmail???? SMTP_DOMAIN? smtp.gmail.com ??)

???????????

le exec rails s

????????? http://localhost:3000 ???????????


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.