Skip to content

Commit

Permalink
Add Puma as direct dependency
Browse files Browse the repository at this point in the history
This commit adds `Puma` as a direct dependency to the Gemfile. Puma was previously installed indirectly through the dependency on `govuk_test` as part of the `dev` and `test` groups; given that we want to run Puma in production, we should instead make it a direct dependency.

Co-authored-by: Chris Banks <chris.banks@digital.cabinet-office.gov.uk>
  • Loading branch information
Karl Baker and sengi committed Oct 19, 2021
1 parent 8572751 commit fe3d7cb
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
ARG base_image=ruby:2.7.2
FROM ${base_image}
RUN apt-get update -qq && apt-get upgrade -y && apt-get install -y build-essential && apt-get clean
RUN gem install foreman

ENV GOVUK_APP_NAME content-store
ENV GOVUK_CONTENT_SCHEMAS_PATH /govuk-content-schemas
Expand All @@ -17,4 +16,4 @@ ADD Gemfile* $APP_HOME/
RUN bundle install
ADD . $APP_HOME

CMD foreman run web
CMD bundle exec puma
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ gem "govuk-content-schema-test-helpers"
gem "mongo"
gem "mongoid"
gem "plek"
gem "puma"
gem "rack-cache"
gem "uuidtools"
gem "whenever", require: false
Expand Down
1 change: 1 addition & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ DEPENDENCIES
pact
plek
pry-byebug
puma
rack-cache
rails (= 6.1.4.1)
rspec-rails
Expand Down
3 changes: 0 additions & 3 deletions config/puma.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
#
environment ENV.fetch("RAILS_ENV") { "development" }

# Specifies the `pidfile` that Puma will use.
pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" }

# Specifies the number of `workers` to boot in clustered mode.
# Workers are forked web server processes. If using threads and workers together
# the concurrency of the application would be max `threads` * `workers`.
Expand Down

0 comments on commit fe3d7cb

Please sign in to comment.