rails_deploy 0.6.8 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc86da3ccbf20d40bbfeb23a3806759997bc07c4f2fdfbfeb553be928a6e2afa
|
4
|
+
data.tar.gz: d808a59ae840e3876ca3668281f379b20131a434d010182fdac3f034236132d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a258554d1c65717261826f4cf3a5b578203938e843b0701b09b85eb9913f04b9b1534a3214ae8f904792e7d0bf7f9a17528796d52c3c843d59dbbe02fa67955
|
7
|
+
data.tar.gz: ac4d3ab32456ca0750f342500c99f22b79201febe7173cf8135a5c445e10650961cdfa02f731cb243246ec787f76659b4cbc039ebcf5fa03b857f8d5e9211c8e
|
@@ -0,0 +1,116 @@
|
|
1
|
+
# Proxy
|
2
|
+
#
|
3
|
+
# Kamal uses [kamal-proxy](https://github.com/basecamp/kamal-proxy) to provide
|
4
|
+
# gapless deployments. It runs on ports 80 and 443 and forwards requests to the
|
5
|
+
# application container.
|
6
|
+
#
|
7
|
+
# The proxy is configured in the root configuration under `proxy`. These are
|
8
|
+
# options that are set when deploying the application, not when booting the proxy.
|
9
|
+
#
|
10
|
+
# They are application-specific, so they are not shared when multiple applications
|
11
|
+
# run on the same proxy.
|
12
|
+
#
|
13
|
+
# The proxy is enabled by default on the primary role but can be disabled by
|
14
|
+
# setting `proxy: false`.
|
15
|
+
#
|
16
|
+
# It is disabled by default on all other roles but can be enabled by setting
|
17
|
+
# `proxy: true` or providing a proxy configuration.
|
18
|
+
proxy:
|
19
|
+
|
20
|
+
# Hosts
|
21
|
+
#
|
22
|
+
# The hosts that will be used to serve the app. The proxy will only route requests
|
23
|
+
# to this host to your app.
|
24
|
+
#
|
25
|
+
# If no hosts are set, then all requests will be forwarded, except for matching
|
26
|
+
# requests for other apps deployed on that server that do have a host set.
|
27
|
+
#
|
28
|
+
# Specify one of `host` or `hosts`.
|
29
|
+
host: foo.example.com
|
30
|
+
hosts:
|
31
|
+
- foo.example.com
|
32
|
+
- bar.example.com
|
33
|
+
|
34
|
+
# App port
|
35
|
+
#
|
36
|
+
# The port the application container is exposed on.
|
37
|
+
#
|
38
|
+
# Defaults to 80:
|
39
|
+
app_port: 3000
|
40
|
+
|
41
|
+
# SSL
|
42
|
+
#
|
43
|
+
# kamal-proxy can provide automatic HTTPS for your application via Let's Encrypt.
|
44
|
+
#
|
45
|
+
# This requires that we are deploying to one server and the host option is set.
|
46
|
+
# The host value must point to the server we are deploying to, and port 443 must be
|
47
|
+
# open for the Let's Encrypt challenge to succeed.
|
48
|
+
#
|
49
|
+
# Defaults to `false`:
|
50
|
+
ssl: true
|
51
|
+
|
52
|
+
# Custom SSL certificate
|
53
|
+
#
|
54
|
+
# In scenarios where Let's Encrypt is not an option, or you already have your own
|
55
|
+
# certificates from a different Certificate Authority, you can configure kamal-proxy
|
56
|
+
# to load the certificate and the corresponding private key from disk.
|
57
|
+
#
|
58
|
+
# The certificate must be in PEM format and contain the full chain. The private key
|
59
|
+
# must also be in PEM format.
|
60
|
+
ssl_certificate_path: /data/cert/foo.example.com/fullchain.pem
|
61
|
+
ssl_private_key_path: /data/cert/foo.example.com/privkey.pem
|
62
|
+
|
63
|
+
# Response timeout
|
64
|
+
#
|
65
|
+
# How long to wait for requests to complete before timing out, defaults to 30 seconds:
|
66
|
+
response_timeout: 10
|
67
|
+
|
68
|
+
# Healthcheck
|
69
|
+
#
|
70
|
+
# When deploying, the proxy will by default hit `/up` once every second until we hit
|
71
|
+
# the deploy timeout, with a 5-second timeout for each request.
|
72
|
+
#
|
73
|
+
# Once the app is up, the proxy will stop hitting the healthcheck endpoint.
|
74
|
+
healthcheck:
|
75
|
+
interval: 3
|
76
|
+
path: /health
|
77
|
+
timeout: 3
|
78
|
+
|
79
|
+
# Buffering
|
80
|
+
#
|
81
|
+
# Whether to buffer request and response bodies in the proxy.
|
82
|
+
#
|
83
|
+
# By default, buffering is enabled with a max request body size of 1GB and no limit
|
84
|
+
# for response size.
|
85
|
+
#
|
86
|
+
# You can also set the memory limit for buffering, which defaults to 1MB; anything
|
87
|
+
# larger than that is written to disk.
|
88
|
+
buffering:
|
89
|
+
requests: true
|
90
|
+
responses: true
|
91
|
+
max_request_body: 40_000_000
|
92
|
+
max_response_body: 0
|
93
|
+
memory: 2_000_000
|
94
|
+
|
95
|
+
# Logging
|
96
|
+
#
|
97
|
+
# Configure request logging for the proxy.
|
98
|
+
# You can specify request and response headers to log.
|
99
|
+
# By default, `Cache-Control`, `Last-Modified`, and `User-Agent` request headers are logged:
|
100
|
+
logging:
|
101
|
+
request_headers:
|
102
|
+
- Cache-Control
|
103
|
+
- X-Forwarded-Proto
|
104
|
+
response_headers:
|
105
|
+
- X-Request-ID
|
106
|
+
- X-Request-Start
|
107
|
+
|
108
|
+
# Forward headers
|
109
|
+
#
|
110
|
+
# Whether to forward the `X-Forwarded-For` and `X-Forwarded-Proto` headers.
|
111
|
+
#
|
112
|
+
# If you are behind a trusted proxy, you can set this to `true` to forward the headers.
|
113
|
+
#
|
114
|
+
# By default, kamal-proxy will not forward the headers if the `ssl` option is set to `true`, and
|
115
|
+
# will forward them if it is set to `false`.
|
116
|
+
forward_headers: true
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
module KamalOverride::Configuration::Validator
|
3
|
+
module Proxy
|
4
|
+
|
5
|
+
def validate!
|
6
|
+
super
|
7
|
+
|
8
|
+
if config['ssl_certificate_path'].present? && config['ssl_private_key_path'].blank?
|
9
|
+
error 'Must set a private key path to use a custom SSL certificate'
|
10
|
+
end
|
11
|
+
|
12
|
+
if config['ssl_private_key_path'].present? && config['ssl_certificate_path'].blank?
|
13
|
+
error 'Must set a certificate path to use a custom SSL private key'
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
Kamal::Configuration::Validator::Proxy.prepend KamalOverride::Configuration::Validator::Proxy
|
data/lib/kamal_override.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_deploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mingyuan Qin
|
@@ -54,8 +54,10 @@ files:
|
|
54
54
|
- lib/kamal_override/commands/docker.rb
|
55
55
|
- lib/kamal_override/commands/proxy.rb
|
56
56
|
- lib/kamal_override/configuration.rb
|
57
|
+
- lib/kamal_override/configuration/docs/proxy.yml
|
57
58
|
- lib/kamal_override/configuration/proxy.rb
|
58
59
|
- lib/kamal_override/configuration/role.rb
|
60
|
+
- lib/kamal_override/configuration/validator/proxy.rb
|
59
61
|
homepage: https://github.com/work-design/rails_deploy
|
60
62
|
licenses:
|
61
63
|
- MIT
|