- Ruby 1.9
- PostgreSQL
- ImageMagick
- Elasticsearch
- Clone the repo:
git clone https://github.com/viode/viode.git
Note: master branch is always stable.
- Enter project folder:
cd viode
- Create the
database.yml
file:
cp config/database.yml.example config/database.yml
Update it with your database credentials.
- Create the
secrets.yml
file:
cp config/secrets.yml.example config/secrets.yml
Adjust as you need.
- Install dependencies:
bundle install
- Create and seed the database:
rake db:setup
This will create a user with username admin
and password 12345678
.
- Add data to the search index:
rake searchkick:reindex:all
Now you can start the server: rails s
.
Create a new branch called heroku
:
git checkout -b heroku
Copy and add secrets.yml
file to git:
cp config/secrets.yml.example config/secrets.yml
git add -f config/secrets.yml
git commit -m "add secrets.yml for heroku"
Push heroku
branch to heroku:
git push heroku heroku:master
Set ruby version:
heroku config:set VIODE_RUBY_VERSION=2.2.2
Set devise secret key:
heroku config:set DEVISE_SECRET_KEY=`rake secret`
Run database migrations:
heroku run rake db:migrate
Add Elasticsearch add-on and set ENV["ELASTICSEARCH_URL"]
:
heroku addons:add bonsai:starter
heroku config:add ELASTICSEARCH_URL=`heroku config:get BONSAI_URL`
Add data to the search index:
heroku run rake searchkick:reindex:all