thruster 0.0.2-x86_64-darwin → 0.0.3-x86_64-darwin

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: 8254d138dff1776d25423f673fc4acc41016e978c427151f726cb2805f85dceb
4
- data.tar.gz: 6a420cd890a1f92b3365882454d5ee0c63ba7f1bc72717ad714ddcd8dc73e1bc
3
+ metadata.gz: c4e2b9a1af43be349c566723cf26c1ab0b47fcbfc81be0cdc9e36016db9de51d
4
+ data.tar.gz: e19ea5d6e223be2f135f7f58f744607da96a03adc82dbeb17fb445691d17a1c9
5
5
  SHA512:
6
- metadata.gz: 1829454971909c2fe5d82d59ef96de0374a990ccab76363f9cfa3db057cc5b443353ad7600c81f512df49b467aab0a86dea13b5089faeace2e377c49ce3fccc7
7
- data.tar.gz: a655dc6192f6a78fe8a97b683eb2a2c116c7d523a8ea5565ea976975aa0aa9a1e67391e301c8f88049f58b5f4ecd73d21014e6ffdfbba5962b1861518c0e65b8
6
+ metadata.gz: 7b8181f222736a8e25b2e01b4624fd0fb356e54176676db25f8a66cf64c6036227b06487ef780955374d4b136430ede318a2b96ab73d4a3ef58684a80a429f48
7
+ data.tar.gz: ea5da7a5280f5d1a47ce8f2b91b28b9280739ca9777a053a3edd28f99da9d14ba6a1e4175e52fc256adc1a64b5d59d7ccba6106e546466476805f236587e8ec2
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2024 Kevin McConnell
1
+ Copyright (c) 37signals, LLC
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -2,24 +2,42 @@
2
2
 
3
3
  Thruster is an HTTP/2 proxy for simple production-ready deployments of Rails
4
4
  applications. It runs alongside the Puma webserver to provide a few additional
5
- features to help your app run efficiently and safely on the open Internet:
5
+ features that help your app run efficiently and safely on the open Internet:
6
6
 
7
- - Automatic SSL certificate management with Let's Encrypt
8
7
  - HTTP/2 support
9
- - Basic HTTP caching
10
- - X-Sendfile support for efficient file serving
11
- - Automatic GZIP compression
8
+ - Automatic SSL certificate management with Let's Encrypt
9
+ - Basic HTTP caching of public assets
10
+ - X-Sendfile support and compression, to efficiently serve static files
11
+
12
+ Thruster aims to be as zero-config as possible. It has no configuration file,
13
+ and most features are automatically enabled with sensible defaults. The goal is
14
+ that simply running your Puma server with Thruster should be enough to get a
15
+ production-ready setup.
12
16
 
13
- Thruster tries to be as zero-config as possible, so most features are
14
- automatically enabled with sensible defaults.
17
+ The only exception to this is SSL provisioning: in order for Thruster to
18
+ provision SSL certificates, it needs to know which domain those certificates
19
+ should be for. So to use SSL, you need to set the `SSL_DOMAIN` environment
20
+ variable. If you don't set this variable, Thruster will run in HTTP-only mode.
21
+
22
+ Thruster also wraps the Puma process so that you can use it without managing
23
+ multiple processes yourself. This is particularly useful when running in a
24
+ containerized environment, where you typically won't have a process manager
25
+ available to coordinate the processes. Instead you can use Thruster as your
26
+ `CMD`, and it will manage Puma for you.
27
+
28
+ Thruster was originally created for the [ONCE](https://once.com) project, where
29
+ we wanted a no-fuss way to serve a Rails application from a single container,
30
+ directly on the open Internet. We've since found it useful for simple
31
+ deployments of other Rails applications.
15
32
 
16
- One exception to that is the `SSL_DOMAIN` environment variable, which is
17
- required to enable SSL provisioning. If `SSL_DOMAIN` is not set, Thruster will
18
- operate in HTTP-only mode.
19
33
 
20
34
  ## Installation
21
35
 
22
- Add this line to your application's Gemfile:
36
+ Thruster is distributed as a Ruby gem. Because Thruster is written in Go, we
37
+ provide several pre-built platform-specific binaries. Installing the gem will
38
+ automatically fetch the appropriate binary for your platform.
39
+
40
+ To install it, add it to your application's Gemfile:
23
41
 
24
42
  ```ruby
25
43
  gem 'thruster'
@@ -31,6 +49,7 @@ Or install it globally:
31
49
  $ gem install thruster
32
50
  ```
33
51
 
52
+
34
53
  ## Usage
35
54
 
36
55
  To run your Puma application inside Thruster, prefix your usual command string
@@ -46,46 +65,34 @@ Or with automatic SSL:
46
65
  $ SSL_DOMAIN=myapp.example.com thrust bin/rails server
47
66
  ```
48
67
 
49
- ## Custom configuration
50
-
51
- Thruster provides a number of environment variables that can be used to
52
- customize its behavior:
53
-
54
- - `SSL_DOMAIN` - The domain name to use for SSL provisioning. If not set, SSL
55
- will be disabled.
56
-
57
- - `TARGET_PORT` - The port that your Puma server should run on. Defaults to
58
- 3000. Thruster will set `PORT` to this when starting your server.
59
68
 
60
- - `CACHE_SIZE` - The size of the HTTP cache in bytes. Defaults to 64MB.
61
-
62
- - `MAX_CACHE_ITEM_SIZE` - The maximum size of a single item in the HTTP cache
63
- in bytes. Defaults to 1MB.
64
-
65
- - `X_SENDFILE_ENABLED` - Whether to enable X-Sendfile support. Defaults to
66
- enabled; set to `0` or `false` to disable.
67
-
68
- - `MAX_REQUEST_BODY` - The maximum size of a request body in bytes. Requests
69
- larger than this size will be refused; `0` means no maximum size. Defaults to
70
- `0`.
71
-
72
- - `STORAGE_PATH` - The path to store Thruster's internal state. Defaults to
73
- `./storage/thruster`.
74
-
75
- - `BAD_GATEWAY_PAGE` - Path to an HTML file to serve when the backend server
76
- returns a 502 Bad Gateway error. Defaults to `./public/502.html`. If there is
77
- no file at the specific path, Thruster will serve an empty 502 response
78
- instead.
79
-
80
- - `HTTP_PORT` - The port to listen on for HTTP traffic. Defaults to 80.
81
-
82
- - `HTTPS_PORT` - The port to listen on for HTTPS traffic. Defaults to 443.
83
-
84
- - `HTTP_IDLE_TIMEOUT` - The maximum time in seconds that a client can be idle
85
- before the connection is closed. Defaults to 60.
86
-
87
- - `HTTP_READ_TIMEOUT` - The maximum time in seconds that a client can take to
88
- send the request headers. Defaults to 30.
69
+ ## Custom configuration
89
70
 
90
- - `HTTP_WRITE_TIMEOUT` - The maximum time in seconds during which the client
91
- must read the response. Defaults to 30.
71
+ In most cases, Thruster should work out of the box with no additional
72
+ configuration. But if you need to customize its behavior, there are a few
73
+ environment variables that you can set.
74
+
75
+ | Variable Name | Description | Default Value |
76
+ |-----------------------|---------------------------------------------------------------------------------|---------------|
77
+ | `SSL_DOMAIN` | The domain name to use for SSL provisioning. If not set, SSL will be disabled. | None |
78
+ | `TARGET_PORT` | The port that your Puma server should run on. Thruster will set `PORT` to this value when starting your server. | 3000 |
79
+ | `CACHE_SIZE` | The size of the HTTP cache in bytes. | 64MB |
80
+ | `MAX_CACHE_ITEM_SIZE` | The maximum size of a single item in the HTTP cache in bytes. | 1MB |
81
+ | `X_SENDFILE_ENABLED` | Whether to enable X-Sendfile support. Set to `0` or `false` to disable. | Enabled |
82
+ | `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` |
83
+ | `STORAGE_PATH` | The path to store Thruster's internal state. Provisioned SSL certificates will be stored here, so that they will not need to be requested every time your application is started. | `./storage/thruster` |
84
+ | `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` |
85
+ | `HTTP_PORT` | The port to listen on for HTTP traffic. | 80 |
86
+ | `HTTPS_PORT` | The port to listen on for HTTPS traffic. | 443 |
87
+ | `HTTP_IDLE_TIMEOUT` | The maximum time in seconds that a client can be idle before the connection is closed. | 60 |
88
+ | `HTTP_READ_TIMEOUT` | The maximum time in seconds that a client can take to send the request headers. | 30 |
89
+ | `HTTP_WRITE_TIMEOUT` | The maximum time in seconds during which the client must read the response. | 30 |
90
+ | `ACME_DIRECTORY` | The URL of the ACME directory to use for SSL certificate provisioning. | `https://acme-v02.api.letsencrypt.org/directory` (Let's Encrypt production) |
91
+ | `EAB_KID` | The EAB key identifier to use when provisioning SSL certificates, if required. | None |
92
+ | `EAB_HMAC_KEY` | The Base64-encoded EAB HMAC key to use when provisioning SSL certificates, if required. | None |
93
+ | `DEBUG` | Set to `1` or `true` to enable debug logging. | Disabled |
94
+
95
+ To prevent naming clashes with your application's own environment variables,
96
+ Thruster's environment variables can optionally be prefixed with `THRUSTER_`.
97
+ For example, `SSL_DOMAIN` can also be written as `THRUSTER_SSL_DOMAIN`. Whenever
98
+ a prefixed variable is set, it will take precedence over the unprefixed version.
Binary file
@@ -1,3 +1,3 @@
1
1
  module Thruster
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thruster
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: x86_64-darwin
6
6
  authors:
7
7
  - Kevin McConnell
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-02-28 00:00:00.000000000 Z
11
+ date: 2024-03-06 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A zero-config HTTP/2 proxy for lightweight production deployments
14
14
  email: kevin@37signals.com