diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..8ae70aed1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM ruby:2.3 + +ENV app /app +RUN mkdir $app +WORKDIR $app + +ENV BUNDLE_PATH /box + +ADD . $app + +CMD rails s -b 0.0.0.0 diff --git a/Gemfile b/Gemfile index 7522d2697..d3c286f43 100644 --- a/Gemfile +++ b/Gemfile @@ -27,6 +27,7 @@ gem "elasticsearch-dsl", "~> 0.1.3" gem "elasticsearch-model", "~> 0.1.8" gem "elasticsearch-rails", "~> 0.1.8" gem "elasticsearch-rails-ha", "~> 1.0.5" +gem "therubyracer" gem "email_reply_parser" gem "factory_girl_rails" gem "faker" diff --git a/Gemfile.lock b/Gemfile.lock index 0a2111ac3..ef935778f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -292,6 +292,7 @@ GEM actionmailer (>= 3.2) letter_opener (~> 1.0) railties (>= 3.2) + libv8 (3.16.14.15) listen (3.1.5) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) @@ -434,6 +435,7 @@ GEM rb-inotify (0.9.7) ffi (>= 0.5.0) redcarpet (3.3.4) + ref (2.0.0) referer-parser (0.3.0) request_store (1.3.1) responders (2.1.1) @@ -511,6 +513,9 @@ GEM sprockets (>= 2.8, < 4.0) test_after_commit (1.0.0) activerecord (>= 3.2) + therubyracer (0.12.2) + libv8 (~> 3.16.14.0) + ref thor (0.19.1) thread_safe (0.3.5) tilt (2.0.5) @@ -626,6 +631,7 @@ DEPENDENCIES spring-commands-rspec sprockets-rails (< 3) test_after_commit + therubyracer timecop uglifier validates_email_format_of diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 000000000..3626c95c0 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,21 @@ +app: + build: . + command: ./script/start + volumes: + - .:/app + volumes_from: + - box + links: + - db + +box: + image: busybox + volumes: + - /box + +db: + image: postgres + ports: + - "5432" + environment: + - DATABASE_NAME=c2_development diff --git a/script/start b/script/start index 67ee2284a..6189f4a81 100755 --- a/script/start +++ b/script/start @@ -1,5 +1,7 @@ #!/bin/sh +bundle check || bundle install + set -e set -x