tpt-rails 1.4.2 → 1.5.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 02dd625bd9a9d1bc33d43038b1d08ce10453d423586938b6ca428475567ae4ea
4
- data.tar.gz: 8b78f4fb111e9db3170f21abfaf0c4c54a34b7d3715fffee64a7851b1bb9dade
3
+ metadata.gz: 186ac4371bdca9ada2a7d9b56af210cb801eb8be69f7f52ef61f88bc9c3456e2
4
+ data.tar.gz: ce8c4ad020f1fc1fc148f0b94ea1f0267f5578137f56207a863bcc1543bb5b03
5
5
  SHA512:
6
- metadata.gz: 25e4a00434bd5c945df5f3f20f6b70c15e91851db4207b75a38ebcd63f4d59b167d3d4a8747280cd4a0bf1bf280721687e29681eb6489be6129841edacf735ab
7
- data.tar.gz: 07f17c97f36929405680bf951ce43eed9220dd25ac878bd9e77e1596fee5ccb4a468a7029584d8ff604ba87e213ae567feda1ae050ac1474ee5f8548fafd256f
6
+ metadata.gz: 9e038cdd076adedf6e8fa84c18fae51e1640d8be70b00e507e03ce56503138c18c3ebaf583935fd418a23b1ce3c1dcd50d7978a54dd28fff78ba46af26b4d0d3
7
+ data.tar.gz: 17e293fcb6566795d5d220e68dcff771b5b69c4bcc6985514aeb523f3175e195350abb538121589435b50037f749efbe4149e3a95e800a0ec54c6c38d80a97a0
@@ -5,6 +5,6 @@ class Tpt::Rails::ConfigurationGenerator < ::Rails::Generators::Base
5
5
 
6
6
  def configure
7
7
  route "mount Tpt::Rails::Engine => '/'"
8
- template 'config/initializers/tpt_rails.rb'
8
+ directory 'config'
9
9
  end
10
10
  end
@@ -0,0 +1,52 @@
1
+ # Puma can serve each request in a thread from an internal thread pool.
2
+ # The `threads` method setting takes two numbers: a minimum and maximum.
3
+ # Any libraries that use thread pools should be configured to match
4
+ # the maximum value specified for Puma. Default is set to 5 threads for minimum
5
+ # and maximum; this matches the default thread size of Active Record.
6
+ #
7
+ max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
8
+ min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count }
9
+ threads min_threads_count, max_threads_count
10
+
11
+ # Specifies the `worker_timeout` threshold that Puma will use to wait before
12
+ # terminating a worker in development environments.
13
+ #
14
+ worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development"
15
+
16
+ # Specifies the `port` that Puma will listen on to receive requests; default is 3000.
17
+ #
18
+ port ENV.fetch("PORT") { 3000 }
19
+
20
+ # Specifies the `environment` that Puma will run in.
21
+ #
22
+ environment ENV.fetch("RAILS_ENV") { "development" }
23
+
24
+ # Specifies the `pidfile` that Puma will use.
25
+ pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" }
26
+
27
+ before_fork do
28
+ Tpt::Rails::PumaStatsCollector.run(metrics_client: Tpt::Rails.statsd)
29
+ end
30
+
31
+ # Specifies the number of `workers` to boot in clustered mode.
32
+ # Workers are forked web server processes. If using threads and workers together
33
+ # the concurrency of the application would be max `threads` * `workers`.
34
+ # Workers do not work on JRuby or Windows (both of which do not support
35
+ # processes).
36
+
37
+ workers ENV.fetch("WEB_CONCURRENCY") { 2 }
38
+
39
+ on_worker_boot do
40
+ # See: https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#on-worker-boot
41
+ ActiveRecord::Base.establish_connection
42
+ end
43
+
44
+ # Use the `preload_app!` method when specifying a `workers` number.
45
+ # This directive tells Puma to first boot the application and load code
46
+ # before forking the application. This takes advantage of Copy On Write
47
+ # process behavior so workers use less memory.
48
+
49
+ preload_app!
50
+
51
+ # Allow puma to be restarted by `rails restart` command.
52
+ plugin :tmp_restart
@@ -39,7 +39,7 @@ spec:
39
39
  tpt/creator: {{ .Values.annotations.creator | default "UNKNOWN" | quote }}
40
40
  annotations:
41
41
  buildID: "{{ .Values.buildID }}"
42
- sidecar.istio.io/inject: "true"
42
+ sidecar.istio.io/inject: "false"
43
43
  spec:
44
44
  # Specifies where our Kube secrets are coming from
45
45
  imagePullSecrets:
@@ -36,6 +36,7 @@ metadata:
36
36
  - request_label:
37
37
  - frontend
38
38
  {{- if eq .Values.service.type "LoadBalancer" }}
39
+ external-dns.alpha.kubernetes.io/hostname: {{ .Values.hostname }}
39
40
  service.beta.kubernetes.io/aws-load-balancer-backend-protocol: "http"
40
41
  service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled: "true"
41
42
  service.beta.kubernetes.io/aws-load-balancer-internal: "0.0.0.0/0"
@@ -1,6 +1,8 @@
1
1
  name: <%= Tpt::Rails.app_name %>
2
2
  deploy_env: production
3
3
 
4
+ hostname: <%= Tpt::Rails.app_name %>-production.teacherspayteachers.com
5
+
4
6
  annotations:
5
7
  costEnv: production
6
8
 
@@ -1,6 +1,8 @@
1
1
  name: <%= Tpt::Rails.app_name %>
2
2
  deploy_env: staging
3
3
 
4
+ hostname: <%= Tpt::Rails.app_name %>-staging.teacherspayteachers.com
5
+
4
6
  annotations:
5
7
  costEnv: staging
6
8
 
@@ -55,7 +55,7 @@ class Tpt::Rails::Internal::ErrorReporter # :nodoc:
55
55
 
56
56
  def configure_rollbar
57
57
  # Ensure that rollbar has been added to the app's Gemfile
58
- gem 'rollbar', '>= 2.23.2', '< 3'
58
+ gem 'rollbar', '>= 2.23.2', '< 4'
59
59
 
60
60
  Rollbar.configure do |config|
61
61
  config.access_token = @rollbar_access_token
@@ -1,6 +1,6 @@
1
1
  module Tpt
2
2
  module Rails
3
3
  # Do not change this manually. Our tooling will do it automatically.
4
- VERSION = '1.4.2'
4
+ VERSION = '1.5.3'
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tpt-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.2
4
+ version: 1.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - TpT
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-18 00:00:00.000000000 Z
11
+ date: 2021-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -93,6 +93,7 @@ files:
93
93
  - config/routes.rb
94
94
  - lib/generators/tpt/rails/configuration/configuration_generator.rb
95
95
  - lib/generators/tpt/rails/configuration/templates/config/initializers/tpt_rails.rb
96
+ - lib/generators/tpt/rails/configuration/templates/config/puma.rb
96
97
  - lib/generators/tpt/rails/continuous_integration/continuous_integration_generator.rb
97
98
  - lib/generators/tpt/rails/continuous_integration/templates/ci/Dockerfile.tt
98
99
  - lib/generators/tpt/rails/continuous_integration/templates/ci/docker-compose.yaml.tt