Skip to content

Commit

Permalink
New docker test
Browse files Browse the repository at this point in the history
  • Loading branch information
Jupiterrr committed Jul 31, 2015
1 parent 35c59e5 commit da5e63e
Show file tree
Hide file tree
Showing 6 changed files with 545 additions and 34 deletions.
30 changes: 30 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM ruby:2.0.0

# throw errors if Gemfile has been modified since Gemfile.lock
RUN bundle config --global frozen 1

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

RUN apt-get update && \
apt-get install -y nodejs --no-install-recommends && \
rm -rf /var/lib/apt/lists/* && \
gem install foreman
# RUN apt-get update && apt-get install -y mysql-client postgresql-client sqlite3 --no-install-recommends && rm -rf /var/lib/apt/lists/*

# Old Gemfiles for better gem caching
ADD docker/Gemfile /usr/src/app/docker/Gemfile
ADD docker/Gemfile.lock /usr/src/app/docker/Gemfile.lock
RUN bundle install --gemfile /usr/src/app/docker/Gemfile


ADD Gemfile /usr/src/app/
ADD Gemfile.lock /usr/src/app/
RUN bundle install

ADD . /usr/src/app


EXPOSE 3000

CMD ["foreman", "start", "web"]
6 changes: 3 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
source ENV['GEMFURY_URL'] if ENV['GEMFURY_URL']
# source ENV['GEMFURY_URL'] if ENV['GEMFURY_URL']
source 'http://rubygems.org'
ruby '2.1.0'
ruby '2.0.0'

gem 'rails', '~> 3.2.13'
gem 'unicorn'

gem 'kit_api', '~> 0.2.4', require: false#, path: File.join('..', 'Downloader')
# gem 'kit_api', '~> 0.2.4', require: false#, path: File.join('..', 'Downloader')
gem 'yo-ruby', require: false
gem 'upsert', require: false
# gem 'pg-hstore', require: false
Expand Down
30 changes: 0 additions & 30 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
GEM
remote: https://gem.fury.io/app15743927_heroku_com/
remote: http://rubygems.org/
specs:
actionmailer (3.2.13)
Expand Down Expand Up @@ -34,23 +33,12 @@ GEM
i18n (= 0.6.1)
multi_json (~> 1.0)
addressable (2.3.4)
akami (1.3.0)
gyoku (>= 0.4.0)
nokogiri
ancestry (2.0.0)
activerecord (>= 3.0.0)
arel (3.0.3)
autoprefixer-rails (1.0.20140103)
execjs
awesome_print (1.1.0)
aws-sdk (2.0.38)
aws-sdk-resources (= 2.0.38)
aws-sdk-core (2.0.38)
builder (~> 3.0)
jmespath (~> 1.0)
multi_json (~> 1.0)
aws-sdk-resources (2.0.38)
aws-sdk-core (= 2.0.38)
backports (3.3.1)
better_errors (0.9.0)
coderay (>= 1.0.0)
Expand Down Expand Up @@ -137,8 +125,6 @@ GEM
grape-swagger (0.6.0)
grape (>= 0.2.0)
kramdown
gyoku (1.3.1)
builder (>= 2.1.2)
hashie (3.2.0)
high_voltage (1.2.2)
hike (1.2.3)
Expand All @@ -152,23 +138,12 @@ GEM
i18n (0.6.1)
intercom-rails (0.2.24)
activesupport (> 3.0)
jmespath (1.0.2)
multi_json (~> 1.0)
journey (1.0.4)
json (1.8.1)
kaminari (0.14.1)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
kgio (2.8.0)
kit_api (0.2.4)
activesupport (>= 3.2.13)
akami (>= 1.2.2)
aws-sdk (>= 1.59.0)
net-ssh (>= 2.6.8)
nokogiri (>= 1.5.0)
nori (>= 2.4.0)
sentry-raven (>= 0.12.1)
typhoeus (>= 0.6.9)
kramdown (1.3.0)
launchy (2.3.0)
addressable (~> 2.3)
Expand All @@ -186,13 +161,11 @@ GEM
multi_json (1.9.0)
multi_xml (0.5.4)
multipart-post (2.0.0)
net-ssh (2.9.2)
newrelic-grape (1.3.0)
grape
newrelic_rpm
newrelic_rpm (3.7.3.204)
nokogiri (1.5.11)
nori (2.5.0)
paper_trail (3.0.0.beta1)
activerecord (>= 3.0, < 5.0)
pg (0.17.1)
Expand Down Expand Up @@ -289,8 +262,6 @@ GEM
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
sentry-raven (0.13.0)
faraday (>= 0.7.6)
sequel (3.20.0)
simple_form (2.1.0)
actionpack (~> 3.0)
Expand Down Expand Up @@ -386,7 +357,6 @@ DEPENDENCIES
hogan_assets
intercom-rails (~> 0.2.21)
kaminari
kit_api (~> 0.2.4)
launchy
meta_request (>= 0.2.5)
metamagic
Expand Down
3 changes: 2 additions & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb
web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb
worker: echo "omg worker wokrer woker"
112 changes: 112 additions & 0 deletions docker/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# source ENV['GEMFURY_URL'] if ENV['GEMFURY_URL']
source 'http://rubygems.org'
ruby '2.0.0'

gem 'rails', '~> 3.2.13'
gem 'unicorn'

# gem 'kit_api', '~> 0.2.4', require: false#, path: File.join('..', 'Downloader')
gem 'yo-ruby', require: false
gem 'upsert', require: false
# gem 'pg-hstore', require: false

# API
gem 'grape', '~> 0.4.1'
gem 'grape-swagger', '> 0.5.0'
gem 'rack-cors'
gem 'garner', '~> 0.3.2'

# View
gem 'slim-rails'
gem 'simple_form'
gem 'high_voltage' # static pages
gem 'sitemap_generator', require: false
gem 'kaminari' # pagination
gem 'rails_autolink'
gem 'redcarpet' # markdown
gem "autoprefixer-rails"
# gem 'gravtastic'
gem 'metamagic'

# Database
gem 'pg', '~> 0.17.1'
gem 'ancestry', '~> 2.0.0'
# gem 'redis', :require=> false
gem 'pg_search' # search
gem 'ri_cal' # timetable -> ical
gem 'activerecord-postgres-hstore'
# gem "acts_as_paranoid", "~>0.4.0"
gem 'paper_trail', '>= 3.0.0.beta1' # versioning
# gem 'heroku_backup_task'

gem "typhoeus"#, require: false
gem 'elasticsearch'

gem 'font_assets'

# gem 'validates_timeliness', '~> 3.0'
gem 'intercom-rails', '~> 0.2.21'
gem 'newrelic_rpm'

group :production do
gem 'newrelic-grape'
end

group :production, :staging do
gem 'dalli', '>= 2.6.4' # memcach
gem 'rack-cache', :require => 'rack/cache'
# gem 'rack-contrib', :require => 'rack/contrib'
# gem 'therubyracer'
# gem 'less-rails', '~> 2.3.3'
# gem 'thin'
gem 'unicorn-worker-killer'
gem 'rails_12factor'
end

group :assets do
gem 'sass-rails', '>= 3.1.5'
gem 'coffee-rails', '>= 3.1.1'
gem 'uglifier', '~> 2.5.0'
#gem 'font-awesome-sass', '~> 4.0.0'
gem "font-awesome-rails", '~> 4.0.0'
gem 'hogan_assets'
end

group :development do
gem 'quiet_assets'
gem 'better_errors'
gem 'binding_of_caller'
gem 'meta_request', '>= 0.2.5'
gem 'taps'
gem 'pry-remote'
gem 'pry-stack_explorer'
# gem 'pry-debugger'
end

group :development, :test do
# gem 'highline' # user input in rake task
gem 'rspec-rails'
gem 'zeus'
gem 'awesome_print'
gem 'pry-rails'
gem 'launchy'
gem 'thin'
end

# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'

group :test do
gem 'factory_girl_rails'
gem 'capybara', '~> 2.0'
gem 'poltergeist', '~> 1.5.0'

gem 'cucumber-rails', require: false
gem 'database_cleaner'
gem 'spork'
gem 'vcr'
gem 'timecop'
gem 'webmock', '>= 1.10'
gem 'rspec_candy'
# gem 'rspec-prof'
end
Loading

0 comments on commit da5e63e

Please sign in to comment.