Selaa lähdekoodia

Config changes

- PUMA_BIND for binding to unix socket
- AARDBEI_PATH for logfile location
- config.force_ssl in production
Maarten van den Berg 7 vuotta sitten
vanhempi
commit
f0216688ed
2 muutettua tiedostoa jossa 6 lisäystä ja 2 poistoa
  1. 1 1
      config/environments/production.rb
  2. 5 1
      config/puma.rb

+ 1 - 1
config/environments/production.rb

@@ -40,7 +40,7 @@ Rails.application.configure do
40 40
   # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
41 41
 
42 42
   # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
43
-  # config.force_ssl = true
43
+  config.force_ssl = true
44 44
 
45 45
   # Use the lowest log level to ensure availability of diagnostic information
46 46
   # when problems arise.

+ 5 - 1
config/puma.rb

@@ -9,12 +9,16 @@ threads threads_count, threads_count
9 9
 
10 10
 # Specifies the `port` that Puma will listen on to receive requests, default is 3000.
11 11
 #
12
-port        ENV.fetch("PORT") { 3000 }
12
+bind	ENV.fetch("PUMA_BIND") { 'tcp://127.0.0.1:3000'}
13 13
 
14 14
 # Specifies the `environment` that Puma will run in.
15 15
 #
16 16
 environment ENV.fetch("RAILS_ENV") { "development" }
17 17
 
18
+state_path "#{ENV['AARDBEI_PATH']}/tmp/pids/puma.state"
19
+stdout_redirect "#{ENV['AARDBEI_PATH']}/log/stdout", "#{ENV['AARDBEI_PATH']}/log/stderr", true
20
+
21
+
18 22
 # Specifies the number of `workers` to boot in clustered mode.
19 23
 # Workers are forked webserver processes. If using threads and workers together
20 24
 # the concurrency of the application would be max `threads` * `workers`.