mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-17 07:40:12 +01:00
New stack and additional details that Heroku has changed in the last two years.
parent
868dd50b05
commit
489bd4edca
1 changed files with 28 additions and 16 deletions
|
|
@ -1,19 +1,31 @@
|
||||||
h1. Heroku
|
# Heroku
|
||||||
|
|
||||||
Installing Tracks 2.0 or newer on Heroku is fairly simple, here are the steps to get tracks working on Heroku (steps for a non-programmer...):
|
Installing Tracks 2.0 or newer on Heroku is fairly simple, here are the steps to get tracks working on Heroku (steps for a non-programmer...):
|
||||||
|
|
||||||
# Unpack the application (I used "git clone," but unzipping will do just fine).
|
* Unpack the application (I used "git clone," but unzipping will do just fine).
|
||||||
# Configure your Tracks instance
|
* Configure your Tracks instance
|
||||||
## Navigate to @config/environments/production.rb@ and change the cache settings to "false" ("config.cache_classes" remains "true", whereas "config.action_controller.perform-caching" is set to "false")
|
* Navigate to `config/environments/production.rb` and change the cache settings to "false" (`config.cache_classes` remains `true`, whereas `config.action_controller.perform-caching` is set to `false`)
|
||||||
## Copy @config/site.yml.tmpl@ to @config/site.yml@ and change its contents (documented by the comments)
|
* Copy `config/site.yml.tmpl` to `config/site.yml` and change its contents (documented by the comments)
|
||||||
## Change the @Gemfile@ and replace the line @gem "sqlite3"@ with @gem "pg"@ and run @bundle install@
|
* You definitely want to change your secret token
|
||||||
# Comment out some of the items in the .gitignore file. I put a hash-- # -- at the beginning of each of these lines:
|
* Your admin email should be updated
|
||||||
<code>
|
* You should decide if you want open signups (beware spam robots!)
|
||||||
#config/site.yml
|
* Once you're ready, you'll want to configure one of the mail providers
|
||||||
</code>
|
* Change the `Gemfile` and
|
||||||
# Add the created site.yml with @git add config/site.yml@ and commit everything with @git commit -a@
|
* Replace the lines `gem "sqlite3", group: :sqlite` and `gem "mysql2", group: :mysql` with a single `gem "pg"`
|
||||||
# Create a Heroku app on the Bamboo stack with @heroku create {NAME} --stack bamboo-ree-1.8.7@
|
* Add a definition near the top for the version of Ruby (e.g. `ruby '1.9.3'`)
|
||||||
# Run @heroku config:add BUNDLE_WITHOUT="development:test:selenium"@ so that only gems needed for production are installed on Heroku
|
* Add a line `gem 'rails_12factor'`
|
||||||
# Push the commit with @git push heroku master@
|
* Create a file called `Procfile` with a single line that reads `web: bundle exec rails server thin -p $PORT -e $RACK_ENV`
|
||||||
# Run the migrations on Heroku with @heroku run rake db:migrate@
|
* Run `bundle install`
|
||||||
# Open the application with @heroku open@
|
* In the `.gitignore` file, comment out `config/site.yml` by putting a hash (`#`) at the beginning of the line.
|
||||||
|
* Add the created `site.yml` and `Gemfile.lock` files to the git repository with `git add config/site.yml Gemfile.lock` and commit everything with `git commit -a -m "Updated/add the site information and bundle additions for Heroku`
|
||||||
|
* Create a Heroku app on the Cedar stack with `heroku create {NAME} --stack cedar-14` where `{NAME}` is something you care about. Or leave it off and Heroku will pick one for you.
|
||||||
|
* Run `heroku config:add BUNDLE_WITHOUT="development:test:selenium"` so that only gems needed for production are installed on Heroku
|
||||||
|
* Push the commit with `git push heroku master`
|
||||||
|
* Run the migrations on Heroku with `heroku run rake db:migrate`
|
||||||
|
* Open the application with `heroku open`
|
||||||
|
* Create your administrator user
|
||||||
|
|
||||||
|
If something goes wrong,
|
||||||
|
# try to follow Heroku's advice (rerun `bundle install` if you modify `Gemfile`)
|
||||||
|
# commit your changes
|
||||||
|
# push your repository back to Heroku
|
||||||
Loading…
Add table
Add a link
Reference in a new issue