anycable-thruster 0.1.15-x86_64-darwin → 0.1.17-x86_64-darwin
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 +4 -4
- data/README.md +55 -19
- data/exe/thrust +17 -2
- data/exe/x86_64-darwin/thrust +0 -0
- data/lib/anycable/thruster/version.rb +1 -1
- data/lib/thruster/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c6a9dfa203d90b5610bb2dfbfdfdd015c6b1417d027a9d59b5d45ac2b4876c89
|
4
|
+
data.tar.gz: 15244a43b64a0901cc64de4c73854edb350f67cb1d94f297e0d1dee3d97f1459
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8cfa1e29a4b58f3b84f03b1675730a018a7a936aec0bcd7f9b459d9312a73422664168720333681f451123063b3e6136c2cbc78192f87d92c5cf688f73c864d4
|
7
|
+
data.tar.gz: b166411d8a3e1a16063fdf4e381decaa343cc294e364d1307e8defd646fa608ced29634d4ae8712a3be20b4287f20d89cfd3972e91ab78f5da154a4377384d7f
|
data/README.md
CHANGED
@@ -26,6 +26,40 @@ ANYCABLE_DEBUG=true thrust bin/rails s
|
|
26
26
|
ANYCABLE_OPT="-debug" thrust bin/rails s
|
27
27
|
```
|
28
28
|
|
29
|
+
## Using a custom AnyCable binary
|
30
|
+
|
31
|
+
AnyCable Thruster can launch an external AnyCable-compatible binary (e.g., **AnyCable Pro**) instead of the one bundled with the gem.
|
32
|
+
Set `ANYCABLE_THRUSTER_BIN_PATH` to either a **full path** or a **command name** (looked up in `$PATH`).
|
33
|
+
If the variable is not set, Thruster falls back to the bundled per-platform binary.
|
34
|
+
|
35
|
+
### Local usage
|
36
|
+
|
37
|
+
If you have `anycable-thruster` available in your `$PATH`:
|
38
|
+
|
39
|
+
```sh
|
40
|
+
# Thruster will exec the given binary and pass through all CLI args
|
41
|
+
ANYCABLE_THRUSTER_BIN_PATH=anycable-thruster thrust bin/rails server
|
42
|
+
|
43
|
+
#You may also use an absolute path if you prefer:
|
44
|
+
ANYCABLE_THRUSTER_BIN_PATH=/usr/local/bin/anycable-thruster thrust bin/rails server
|
45
|
+
```
|
46
|
+
|
47
|
+
### Heroku (with the AnyCable Go buildpack)
|
48
|
+
|
49
|
+
**Configure the AnyCable Go buildpack to fetch the Thruster binary:**
|
50
|
+
- `HEROKU_ANYCABLE_GO_BINARY_NAME=anycable-thruster`
|
51
|
+
|
52
|
+
In Procfile:
|
53
|
+
|
54
|
+
```
|
55
|
+
# resolves via PATH
|
56
|
+
web: ANYCABLE_THRUSTER_BIN_PATH=anycable-thruster thrust bin/rails server
|
57
|
+
|
58
|
+
# resolve absolute path at runtime
|
59
|
+
# web: ANYCABLE_THRUSTER_BIN_PATH=$(which anycable-thruster) thrust bin/rails server
|
60
|
+
```
|
61
|
+
|
62
|
+
For full buildpack options see the buildpack [README](https://github.com/anycable/heroku-anycable-go).
|
29
63
|
----
|
30
64
|
|
31
65
|
> [!NOTE]
|
@@ -104,25 +138,27 @@ configuration. But if you need to customize its behavior, there are a few
|
|
104
138
|
environment variables that you can set.
|
105
139
|
|
106
140
|
| Variable Name | Description | Default Value |
|
107
|
-
|
108
|
-
| `TLS_DOMAIN`
|
109
|
-
| `TARGET_PORT`
|
110
|
-
| `CACHE_SIZE`
|
111
|
-
| `MAX_CACHE_ITEM_SIZE`
|
112
|
-
| `
|
113
|
-
| `
|
114
|
-
| `
|
115
|
-
| `
|
116
|
-
| `
|
117
|
-
| `
|
118
|
-
| `
|
119
|
-
| `
|
120
|
-
| `
|
121
|
-
| `
|
122
|
-
| `
|
123
|
-
| `
|
124
|
-
| `
|
125
|
-
| `
|
141
|
+
|-----------------------------|---------------------------------------------------------|---------------|
|
142
|
+
| `TLS_DOMAIN` | Comma-separated list of domain names to use for TLS provisioning. If not set, TLS will be disabled. | None |
|
143
|
+
| `TARGET_PORT` | The port that your Puma server should run on. Thruster will set `PORT` to this value when starting your server. | 3000 |
|
144
|
+
| `CACHE_SIZE` | The size of the HTTP cache in bytes. | 64MB |
|
145
|
+
| `MAX_CACHE_ITEM_SIZE` | The maximum size of a single item in the HTTP cache in bytes. | 1MB |
|
146
|
+
| `GZIP_COMPRESSION_ENABLED` | Whether to enable gzip compression for static assets. Set to `0` or `false` to disable. | Enabled |
|
147
|
+
| `X_SENDFILE_ENABLED` | Whether to enable X-Sendfile support. Set to `0` or `false` to disable. | Enabled |
|
148
|
+
| `MAX_REQUEST_BODY` | The maximum size of a request body in bytes. Requests larger than this size will be refused; `0` means no maximum size is enforced. | `0` |
|
149
|
+
| `STORAGE_PATH` | The path to store Thruster's internal state. Provisioned TLS certificates will be stored here, so that they will not need to be requested every time your application is started. | `./storage/thruster` |
|
150
|
+
| `BAD_GATEWAY_PAGE` | Path to an HTML file to serve when the backend server returns a 502 Bad Gateway error. If there is no file at the specific path, Thruster will serve an empty 502 response instead. Because Thruster boots very quickly, a custom page can be a useful way to show that your application is starting up. | `./public/502.html` |
|
151
|
+
| `HTTP_PORT` | The port to listen on for HTTP traffic. | 80 |
|
152
|
+
| `HTTPS_PORT` | The port to listen on for HTTPS traffic. | 443 |
|
153
|
+
| `HTTP_IDLE_TIMEOUT` | The maximum time in seconds that a client can be idle before the connection is closed. | 60 |
|
154
|
+
| `HTTP_READ_TIMEOUT` | The maximum time in seconds that a client can take to send the request headers and body. | 30 |
|
155
|
+
| `HTTP_WRITE_TIMEOUT` | The maximum time in seconds during which the client must read the response. | 30 |
|
156
|
+
| `ACME_DIRECTORY` | The URL of the ACME directory to use for TLS certificate provisioning. | `https://acme-v02.api.letsencrypt.org/directory` (Let's Encrypt production) |
|
157
|
+
| `EAB_KID` | The EAB key identifier to use when provisioning TLS certificates, if required. | None |
|
158
|
+
| `EAB_HMAC_KEY` | The Base64-encoded EAB HMAC key to use when provisioning TLS certificates, if required. | None |
|
159
|
+
| `FORWARD_HEADERS` | Whether to forward X-Forwarded-* headers from the client. | Disabled when running with TLS; enabled otherwise |
|
160
|
+
| `LOG_REQUESTS` | Log all requests. Set to `0` or `false` to disable request logging | Enabled |
|
161
|
+
| `DEBUG` | Set to `1` or `true` to enable debug logging. | Disabled |
|
126
162
|
|
127
163
|
To prevent naming clashes with your application's own environment variables,
|
128
164
|
Thruster's environment variables can optionally be prefixed with `THRUSTER_`.
|
data/exe/thrust
CHANGED
@@ -1,11 +1,26 @@
|
|
1
1
|
#! /usr/bin/env ruby
|
2
2
|
|
3
|
-
|
3
|
+
ENV_KEY = "ANYCABLE_THRUSTER_BIN_PATH"
|
4
|
+
CUSTOM_ANYCABLE_PATH = ENV[ENV_KEY].to_s
|
5
|
+
|
6
|
+
if CUSTOM_ANYCABLE_PATH != ""
|
7
|
+
begin
|
8
|
+
exec(CUSTOM_ANYCABLE_PATH, *ARGV)
|
9
|
+
rescue Errno::ENOENT
|
10
|
+
warn("ERROR: #{ENV_KEY}=#{CUSTOM_ANYCABLE_PATH.inspect} not found in PATH or as a file.")
|
11
|
+
exit 1
|
12
|
+
rescue SystemCallError => e
|
13
|
+
warn("ERROR: #{ENV_KEY}=#{CUSTOM_ANYCABLE_PATH.inspect} failed: #{e.class}: #{e.message}")
|
14
|
+
exit 1
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
PLATFORM = %i[cpu os].map { |m| Gem::Platform.local.send(m) }.join("-")
|
4
19
|
EXECUTABLE = File.expand_path(File.join(__dir__, PLATFORM, "thrust"))
|
5
20
|
|
6
21
|
if File.exist?(EXECUTABLE)
|
7
22
|
exec(EXECUTABLE, *ARGV)
|
8
23
|
else
|
9
|
-
|
24
|
+
warn("ERROR: Unsupported platform: #{PLATFORM}")
|
10
25
|
exit 1
|
11
26
|
end
|
data/exe/x86_64-darwin/thrust
CHANGED
Binary file
|
data/lib/thruster/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: anycable-thruster
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.17
|
5
5
|
platform: x86_64-darwin
|
6
6
|
authors:
|
7
7
|
- Kevin McConnell
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
- Igor Platonov
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: A zero-config HTTP/2 proxy for lightweight production deployments with
|
15
15
|
AnyCable real-time server included
|
@@ -46,7 +46,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
requirements: []
|
49
|
-
rubygems_version: 3.6.
|
49
|
+
rubygems_version: 3.6.9
|
50
50
|
specification_version: 4
|
51
51
|
summary: Zero-config HTTP/2 proxy with embedded AnyCable
|
52
52
|
test_files: []
|