#.env
COIN_MARKET_CAP_API_KEY=xxx
GITHUB_KEY=xxx
GITHUB_SECRET=xxx
This is for your convinience.
Normally its content goes to encrypted credentials, rather than in env vars.
I used new version of coinmarketcap APIs. You can get api key here: https://sandbox.coinmarketcap.com/
Make sure GitHub Authorization callback URL is http://127.0.0.1:3000/auth/github/callback
sudo docker-compose build
sudo docker-compose run dev-app rake db:create
sudo docker-compose run dev-app rake db:migrate
sudo docker-compose up
Visit http://127.0.0.1:3000
(Javascript should be enabled for correct work.)
tests:
sudo docker-compose run dev-app rspec
Also, you can check coverage in coverage/
docs:
sudo docker-compose run dev-app yard
It's partially documented though...
code style:
sudo docker-compose run dev-app rubocop
It is just a production-like setup. It is not a real production and high-load ready setup. Yet it works trough ssl and does rails production setup.
#.env
COIN_MARKET_CAP_API_KEY=xxx
GITHUB_KEY=xxx
GITHUB_SECRET=xxx
This is for your convinience.
Normally its content goes to encrypted credentials, rather than in env vars.
I used new version of coinmarketcap APIs. You can get api key here: https://sandbox.coinmarketcap.com
Make sure GitHub Authorization callback URL is https://127.0.0.1:443/auth/github/callback
My certs are self-singed. Browser will warn you about unsecure connection because of that.
sudo docker-compose -f docker-compose-production.yml build
sudo docker-compose -f docker-compose-production.yml run app rake db:create
sudo docker-compose -f docker-compose-production.yml run app rake db:migrate
sudo docker-compose -f docker-compose-production.yml up
Visit https://127.0.0.1:443
(Javascript should be enabled for correct work.)
Cookie hijack is unlikely to happen with this setup. However it possible in theory. Also it's prevention comes with decreasing speed and increasing load drawbacks.