diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..531ad5c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM ruby:2.1.5 +RUN apt-get update -qq && apt-get install -y build-essential ruby-dev libxslt1-dev libxml2-dev libpq-dev nodejs sqlite3 postgresql-client redis-server + +RUN git clone https://github.com/nomlab/camome.git + +WORKDIR camome + +RUN bundle install --path vendor/bundle +ADD config/secrets.yml config/secrets.yml +ADD config/application_settings.yml config/application_settings.yml +ADD config/database.yml config/database.yml +RUN git submodule init +RUN git config submodule.vendor/assets/bootstrap-table.url https://github.com/wenzhixin/bootstrap-table.git +RUN git config submodule.vendor/assets/jsSHA.url https://github.com/Caligatio/jsSHA.git +RUN git submodule update \ No newline at end of file diff --git a/Gemfile b/Gemfile index 62acca0..8f90dfa 100644 --- a/Gemfile +++ b/Gemfile @@ -5,6 +5,7 @@ source 'https://rubygems.org' gem 'rails', '4.1.8' # Use sqlite3 as the database for Active Record gem 'sqlite3' +gem 'pg' # Use SCSS for stylesheets gem 'sass-rails', '~> 4.0.3' # Use Uglifier as compressor for JavaScript assets diff --git a/Gemfile.lock b/Gemfile.lock index 66e34e7..f933590 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -92,7 +92,7 @@ GEM less-rails (2.6.0) actionpack (>= 3.1) less (~> 2.6.0) - libv8 (3.16.14.7) + libv8 (3.16.14.19) mail (2.6.3) mime-types (>= 1.16, < 3) mime-types (2.4.3) @@ -123,6 +123,7 @@ GEM oauth2 (~> 1.0) omniauth (~> 1.2) orm_adapter (0.5.0) + pg (0.21.0) rack (1.5.2) rack-test (0.6.2) rack (>= 1.0) @@ -232,6 +233,7 @@ DEPENDENCIES nokogiri omniauth omniauth-google-oauth2 + pg rails (= 4.1.8) redis rspec-rails diff --git a/app/models/redis_store.rb b/app/models/redis_store.rb index c3882a5..eb39ef3 100644 --- a/app/models/redis_store.rb +++ b/app/models/redis_store.rb @@ -1,7 +1,9 @@ +require 'uri' module DataStore class RedisStore < Base def initialize - @redis = Redis.new + uri = URI.parse(ApplicationSettings.redis.url) + @redis = Redis.new(host: uri.host, port: uri.port) end def load(key) diff --git a/app/views/events/_recurrence_item.html.erb b/app/views/events/_recurrence_item.html.erb index e4e8fd5..d385edd 100644 --- a/app/views/events/_recurrence_item.html.erb +++ b/app/views/events/_recurrence_item.html.erb @@ -1,4 +1,4 @@