diff --git a/Dockerfile b/Dockerfile index 1539f2c5f9..106516d922 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,13 +3,10 @@ FROM openshift/ruby-20-centos RUN gem install sinatra sinatra-activerecord mysql2 --no-ri --no-rdoc ADD . /tmp/ - USER root - RUN chown -R ruby:ruby /tmp/* USER ruby - WORKDIR /tmp/ EXPOSE 8080 diff --git a/Rakefile b/Rakefile index d473245ac4..41d84a7a9f 100644 --- a/Rakefile +++ b/Rakefile @@ -1,4 +1,4 @@ -require_relative 'config/environments' +require_relative 'config/database' require_relative 'models' require 'sinatra/activerecord/rake' diff --git a/app.rb b/app.rb index 04ea6d0e94..31230f4e7a 100644 --- a/app.rb +++ b/app.rb @@ -1,5 +1,5 @@ require 'sinatra' -require_relative 'config/environments' +require_relative 'config/database' require_relative 'models' set :bind, '0.0.0.0' diff --git a/config/environments.rb b/config/database.rb similarity index 100% rename from config/environments.rb rename to config/database.rb diff --git a/db/migrate/20141102191902_create_key_pair.rb b/db/migrate/20141102191902_create_key_pair.rb index e64e6d2a00..a4a44a9f5f 100644 --- a/db/migrate/20141102191902_create_key_pair.rb +++ b/db/migrate/20141102191902_create_key_pair.rb @@ -7,6 +7,6 @@ def up end def down - drop_table :keypairs + drop_table :key_pairs end end diff --git a/models.rb b/models.rb index cb5170a2b0..f03b50e4f9 100644 --- a/models.rb +++ b/models.rb @@ -1,5 +1,5 @@ require 'active_record' class KeyPair < ActiveRecord::Base - self.primary_key='key' + self.primary_key = 'key' end