Ruby on Rails + Angular code template for Banana Coding
- Create a new repo on github
- Open Terminal
- Create a bare clone of the repository.
git clone --bare [email protected]:BananaCoding/yellowprint.git
- Mirror-push to the new repository.
cd yellowprint
git push --mirror [email protected]:BananaCoding/new-repository.git
Where new-repository
is the name of your new github repo.
5. Remove template folder from your local machine.
cd ..
rm -rf yellowprint
- Clone new repo to your local machine.
git clone [email protected]:BananaCoding/new-repository.git
- install rbenv
brew install rbenv
brew upgrade rbenv ruby-build
- ruby 2.5.0
rbenv install 2.5.0
rbenv global 2.5.0
- nodejs
brew install node
- create
config/application.yml
you can copy sample file fromconfig/application.sample.yml
- create
config/database.yml
you can copy sample file fromconfig/database.sample.yml
- run
bundle install
- run
rake db:setup
to setup database - start server with
rails s
command
We're using Figaro as a Rails app configuration, so please create your own 'config/application.yml' by running
bundle exec figaro install
you can see the required ENV in 'config/initializer/figaro.rb'
ps. please also check 'config/application.sample.yml'
- link project to Heroku repo by using command
git remote add heroku [email protected]:project.git
where project
is the name of your Heroku project
- deploy to Heroku by using command
git push heroku master
We are using Drone as CI (Continuous Integration). Please check .drone.yml
file
You also have to setup your Drone project and environment variables at http://drone.bananacoding.com
Following are required variables
- HEROKU_API_KEY (You can get the key from Heroku website > Account Setting > API Key)
- HEROKU_LOGIN (Your email)
- HEROKU_GIT_URL (https://git.heroku.com/your-app-name.git ** where
your-app-name
is your Heroku app name) - EMAIL_HOST
- EMAIL_USERNAME
- EMAIL_PASSWORD
You can enable rails admin by adding rails_admin_path
variable into your application.yml file