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
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Git, docker, Ruby, MySQL ??
clone https://github.com/codeforkanazawa-org/ha4go.git
a4go
le install --path vendor/bundle
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
?????? production
???? development
?????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
????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 ?????????????(OAuth?????????)???????
Facebook Developers https://developers.facebook.com/
http://localhost:3000/
http://localhost:3000/
.env
? ???????????BOOK_APP_ID={App ID}"
BOOK_APP_SECRET={App Secret}
Gmail??????????????????????????????(Gmail???? SMTP_DOMAIN? smtp.gmail.com
??)
le exec rails s
????????? http://localhost:3000
???????????