Giter Site home page Giter Site logo

adi-grupe's Introduction

Adi-Grupe

Maps/Rails Group up app

Setting up

bundle install

rails db:migrate

rake gen_location_data 
rake gen_quest_data



alias 'be'='bundle exec'
be foreman start  # or bundle exec rails server etc..   

# https://github.com/javan/whenever
# see background jobs set up in config/schedule.rb
whenever  
# write the jobs to crontab
whenever --update-crontab

rails searchkick gem depends on elasticsearch:

brew install elasticsearch
brew install kibana (optional, opens http://localhost:5601/)
elasticsearch
kibana

rake searchkick:reindex CLASS=Location

Development / Testing

be rake about

#builds into public/packs-test, set in config/webpacker.yml
RAILS_ENV=test ./bin/webpack  

## Acceptance tests: chrome driver via capybara
be rspec

## integration
be rails test test/integration/*

See Devnotes.md for cheatsheet + ideas

Heroku

heroku login
heroku create
heroku addons:create heroku-postgresql:hobby-dev
heroku addons:create heroku-redis:hobby-dev   ## a/b split testing 

heroku config:set GOOGLE_GEOCODER_API_KEY=<key>
heroku config:set GOOGLE_MAPS_JS_API_KEY=<key>
heroku run rails db:migrate


#when pushing new code
git push heroku master  #etc...
heroku run rails db:migrate
heroku ps:restart
##### setting up SearchBox for searchkick support in rails
https://github.com/ankane/searchkick#heroku


heroku addons:create searchbox:starter
heroku config:set ELASTICSEARCH_URL=`heroku config:get SEARCHBOX_URL`

heroku run rake searchkick:reindex CLASS=Transaction
heroku run rake searchkick:reindex CLASS=Location

  lib/tasks/<some_task.rake>
heroku run rake gen_location_data
heroku run rake gen_quest_data

# Heroku wont use whenever crontab, uses 'Scheduler' instead
https://devcenter.heroku.com/articles/scheduler
heroku addons:create scheduler:standard


# Since scheduler costs $$$, can cleanup manually:
heroku run rails console
Grupe.clean_up_expired_grupes

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.