Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gets the app running Docker via use of Docker Compose. #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added .env.db
Empty file.
Empty file added .env.web
Empty file.
26 changes: 26 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#
# Ohmbrewer - The web application for a happy brewday
# See http://ohmbrewer.org for more information
#

FROM ruby:2.2.1
MAINTAINER Kyle Oliveira <[email protected]>

ENV APP_HOME /ohmbrewer

RUN apt-get update -qq && apt-get install -y build-essential libpq-dev

RUN mkdir $APP_HOME

# Provide a cache for the Gemfile, etc. so Docker builds faster
WORKDIR $APP_HOME
ADD Gemfile* $APP_HOME/
RUN bundle install

# Add the web application
ADD . $APP_HOME
WORKDIR $APP_HOME
RUN bundle exec rake jobs:work &
#RUN RAILS_ENV=production bundle exec rake assets:precompile --trace
#CMD ["rails","server","-b","0.0.0.0"]

70 changes: 35 additions & 35 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ GEM
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
arel (6.0.2)
arel (6.0.3)
attr_encrypted (1.3.4)
encryptor (>= 1.3.0)
autoprefixer-rails (5.2.0.1)
autoprefixer-rails (6.0.3)
execjs
json
bcrypt (3.1.10)
Expand All @@ -55,7 +55,7 @@ GEM
columnize (~> 0.8)
debugger-linecache (~> 1.2)
slop (~> 3.6)
capybara (2.4.4)
capybara (2.5.0)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
Expand All @@ -71,7 +71,7 @@ GEM
execjs
coffee-script-source (1.9.1.1)
columnize (0.9.0)
cucumber (1.3.19)
cucumber (1.3.20)
builder (>= 2.1.2)
diff-lcs (>= 1.1.3)
gherkin (~> 2.12)
Expand All @@ -83,56 +83,56 @@ GEM
mime-types (>= 1.16, < 3)
nokogiri (~> 1.5)
rails (>= 3, < 5)
daemons (1.2.2)
daemons (1.2.3)
debug_inspector (0.0.2)
debugger-linecache (1.2.0)
delayed_job (4.0.6)
delayed_job (4.1.1)
activesupport (>= 3.0, < 5.0)
delayed_job_active_record (4.0.3)
activerecord (>= 3.0, < 5.0)
delayed_job (>= 3.0, < 4.1)
delayed_job_active_record (4.1.0)
activerecord (>= 3.0, < 5)
delayed_job (>= 3.0, < 5)
diff-lcs (1.2.5)
encryptor (1.3.0)
erubis (2.7.0)
execjs (2.5.2)
execjs (2.6.0)
faker (1.4.2)
i18n (~> 0.5)
faraday (0.9.1)
multipart-post (>= 1.2, < 3)
faraday_middleware (0.10.0)
faraday (>= 0.7.4, < 0.10)
ffi (1.9.8)
ffi (1.9.10)
gherkin (2.12.2)
multi_json (~> 1.3)
globalid (0.3.5)
globalid (0.3.6)
activesupport (>= 4.1.0)
i18n (0.7.0)
jbuilder (2.3.0)
jbuilder (2.3.2)
activesupport (>= 3.0.0, < 5)
multi_json (~> 1.2)
jquery-rails (4.0.4)
jquery-rails (4.0.5)
rails-dom-testing (~> 1.0)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (1.8.3)
libv8 (3.16.14.7)
loofah (2.0.2)
libv8 (3.16.14.11)
loofah (2.0.3)
nokogiri (>= 1.5.9)
mail (2.6.3)
mime-types (>= 1.16, < 3)
mime-types (2.6.1)
mime-types (2.6.2)
mini_portile (0.6.2)
minitest (5.7.0)
multi_json (1.11.1)
minitest (5.8.1)
multi_json (1.11.2)
multi_test (0.1.2)
multipart-post (2.0.0)
nokogiri (1.6.6.2)
mini_portile (~> 0.6.0)
particlerb (1.1.0)
faraday (~> 0.9.0)
faraday_middleware (>= 0.9.0)
pg (0.18.2)
puma (2.12.2)
pg (0.18.3)
puma (2.14.0)
rack (1.6.4)
rack-test (0.6.3)
rack (>= 1.0)
Expand All @@ -149,7 +149,7 @@ GEM
sprockets-rails
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
rails-dom-testing (1.0.6)
rails-dom-testing (1.0.7)
activesupport (>= 4.2.0.beta, < 5.0)
nokogiri (~> 1.6.0)
rails-deprecated_sanitizer (>= 1.0.1)
Expand All @@ -162,27 +162,27 @@ GEM
thor (>= 0.18.1, < 2.0)
rake (10.4.2)
rdoc (4.2.0)
ref (1.0.5)
ref (2.0.0)
rubyzip (1.1.7)
sass (3.4.14)
sass-rails (5.0.3)
sass (3.4.18)
sass-rails (5.0.4)
railties (>= 4.0.0, < 5.0)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (~> 1.1)
tilt (>= 1.1, < 3)
sdoc (0.4.1)
json (~> 1.7, >= 1.7.7)
rdoc (~> 4.0)
selenium-webdriver (2.46.2)
selenium-webdriver (2.47.1)
childprocess (~> 0.5)
multi_json (~> 1.0)
rubyzip (~> 1.0)
websocket (~> 1.0)
slop (3.6.0)
sprockets (3.2.0)
rack (~> 1.0)
sprockets-rails (2.3.2)
sprockets (3.3.5)
rack (> 1, < 3)
sprockets-rails (2.3.3)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0)
Expand All @@ -193,17 +193,17 @@ GEM
ref
thor (0.19.1)
thread_safe (0.3.5)
tilt (1.4.1)
tilt (2.0.1)
turbolinks (2.5.3)
coffee-rails
tzinfo (1.2.2)
thread_safe (~> 0.1)
uglifier (2.7.1)
uglifier (2.7.2)
execjs (>= 0.3.0)
json (>= 1.8.0)
watir-webdriver (0.7.0)
selenium-webdriver (>= 2.45)
web-console (2.1.3)
watir-webdriver (0.8.0)
selenium-webdriver (>= 2.46.2)
web-console (2.2.1)
activemodel (>= 4.0)
binding_of_caller (>= 0.7.2)
railties (>= 4.0)
Expand Down
4 changes: 4 additions & 0 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
# Raises error for missing translations
# config.action_view.raise_on_missing_translations = true

# We don't really care too much about whether the app can render a console
# from a specific network. So, this is basically a STFU to the app.
# Probably don't want to do this in prod...
config.web_console.whiny_requests = false

# ActionMailer configuration. Send all mail to mailcatcher (which must be up, btw)
config.action_mailer.delivery_method = :smtp
Expand Down
20 changes: 20 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
db:
image: postgres
ports:
- "5432:5432"
env_file:
- '.env.db'

web:
build: .
command: bundle exec rails s -p 3000 -b '0.0.0.0'
volumes:
- .:/ohmbrewer
ports:
- "3000:3000"
links:
- db
env_file:
- '.env.web'