-
Notifications
You must be signed in to change notification settings - Fork 2
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
Docker2 #2756
base: main
Are you sure you want to change the base?
Docker2 #2756
Changes from all commits
f877622
8c38fc7
58a41cf
fc86d78
17f6777
f052905
f4ee39c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ postgres-data | |
redis-data | ||
# Required for puma to have a place to put the pid file | ||
!tmp/pids/.keep | ||
public/assets |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# frozen_string_literal: true | ||
|
||
server 'sul-h2-qa.stanford.edu', user: 'h2', roles: %w[web app db] | ||
# Roles are passed to docker-compose as profiles. | ||
server 'h2-docker-qa.stanford.edu', user: 'h2', roles: %w[web app db cron worker] | ||
|
||
Capistrano::OneTimeKey.generate_one_time_key! |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,8 @@ | |
# the maximum value specified for Puma. Default is set to 5 threads for minimum | ||
# and maximum; this matches the default thread size of Active Record. | ||
# | ||
max_threads_count = ENV.fetch('RAILS_MAX_THREADS', 5) | ||
min_threads_count = ENV.fetch('RAILS_MIN_THREADS') { max_threads_count } | ||
max_threads_count = ENV.fetch('PUMA_MAX_THREADS', 5) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changing these variables so that their naming is clearer elsewhere (e.g., in puppet files). |
||
min_threads_count = ENV.fetch('PUMA_MIN_THREADS') { max_threads_count } | ||
threads min_threads_count, max_threads_count | ||
|
||
# Specifies the `port` that Puma will listen on to receive requests; default is 3000. | ||
|
@@ -27,14 +27,14 @@ | |
# Workers do not work on JRuby or Windows (both of which do not support | ||
# processes). | ||
# | ||
# workers ENV.fetch("WEB_CONCURRENCY") { 2 } | ||
workers ENV.fetch('PUMA_WORKERS', 2) | ||
|
||
# Use the `preload_app!` method when specifying a `workers` number. | ||
# This directive tells Puma to first boot the application and load code | ||
# before forking the application. This takes advantage of Copy On Write | ||
# process behavior so workers use less memory. | ||
# | ||
# preload_app! | ||
preload_app! | ||
|
||
# Allow puma to be restarted by `rails restart` command. | ||
plugin :tmp_restart |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,4 @@ | |
# Character.create(name: 'Luke', movie: movies.first) | ||
|
||
# The SDR user is used in Events performed by SDR. | ||
User.create!(name: 'SDR', email: 'sdr@stanford.edu') | ||
User.find_or_create_by!(name: 'SDR', email: 'sdr@stanford.edu') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This allows seeding as part of deploy. Currently, it was performed as a manual operation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of these queue changes are so that we can run multiple instances of H2 in a single environment and each has its own queue. This will allow us to run a dockerized H2 and a plain-old H2 together.