Skip to content

Instantly share code, notes, and snippets.

@enebo
Last active November 15, 2019 16:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save enebo/2ba6265759127b388bb229f5788adb78 to your computer and use it in GitHub Desktop.
Save enebo/2ba6265759127b388bb229f5788adb78 to your computer and use it in GitHub Desktop.
  1. edit similar to: https://gist.github.com/enebo/94d39d94dabcfe9fadbb1aa5ac050528 (appropriate per which db you end up using)
  2. cp config/database.yml.example config/database.yml
  3. edit config/database.yml for db
  4. jruby -S bundle install --without development test rmagick
  5. jruby -S bundler exec rake generate_secret_token
  6. jruby -S bundler exec rake db:migrate RAILS_ENV="production"
  7. RAILS_ENV=production jruby -S rake db:fixtures:load

= Postgres Database Configuration

  1. Log in via psql as superuser/admin db role (psql -U {user} postgres)
  2. create user redmine;
  3. ALTER ROLE redmine CREATEDB;
  4. create database redmine;
  5. GRANT ALL PRIVILEGES ON DATABASE redmine TO redmine;

= config/database.yml

# PostgreSQL configuration example
production:
 adapter: postgresql
 database: redmine
 host: localhost
 username: redmine
 password: <%= ENV['PASSWORD'] %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment