Skip to content

Commit 51ae837

Browse files
committed
Document environment variables in a table
1 parent f841494 commit 51ae837

File tree

1 file changed

+13
-24
lines changed

1 file changed

+13
-24
lines changed

README.md

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -133,30 +133,19 @@ combination.
133133
The following environment variables can be set to configure the server and
134134
run-time behavior:
135135

136-
* `WASTEBIN_ADDRESS_PORT` string that determines which address and port to bind
137-
a. If not set, it binds by default to `0.0.0.0:8088`.
138-
* `WASTEBIN_BASE_URL` string that determines the base URL for the QR code
139-
display. If not set, the user agent's `Host` header field is used as an
140-
approximation.
141-
* `WASTEBIN_CACHE_SIZE` number of rendered syntax highlight items to cache.
142-
Defaults to 128 and can be disabled by setting to 0.
143-
* `WASTEBIN_DATABASE_PATH` path to the sqlite3 database file. If not set, an
144-
in-memory database is used.
145-
* `WASTEBIN_HTTP_TIMEOUT` maximum number of seconds a request can be processed
146-
until wastebin responds with 408, by default it is set to 5 seconds.
147-
* `WASTEBIN_MAX_BODY_SIZE` number of bytes to accept for POST requests. Defaults
148-
to 1 MB.
149-
* `WASTEBIN_MAX_PASTE_EXPIRATION` maximum allowed lifetime of a paste in
150-
seconds. Defaults to 0 meaning unlimited.
151-
* `WASTEBIN_PASSWORD_SALT` salt used to hash user passwords used for encrypting
152-
pastes.
153-
* `WASTEBIN_SIGNING_KEY` sets the key to sign cookies. If not set, a random key
154-
will be generated which means cookies will become invalid after restarts and
155-
paste creators will not be able to delete their pastes anymore. Needs to be 64 characters long.
156-
* `WASTEBIN_TITLE` overrides the HTML page title. Defaults to `wastebin`.
157-
* `RUST_LOG` influences logging. Besides the typical `trace`, `debug`, `info`
158-
etc. keys, you can also set the `tower_http` key to some log level to get
159-
additional information request and response logs.
136+
| Variable | Description | Default |
137+
| --------------------------------- | ------------------------------------------------------------- | --------------------- |
138+
| `WASTEBIN_ADDRESS_PORT` | Address and port to bind the server to. | `0.0.0.0:8088`. |
139+
| `WASTEBIN_BASE_URL` | Base URL for the QR code display. | User agent's `Host` header field used as an approximation. |
140+
| `WASTEBIN_CACHE_SIZE` | Number of rendered items to cache, disable with 0. | 128 |
141+
| `WASTEBIN_DATABASE_PATH` | Path to the sqlite3 database file. | `:memory:` |
142+
| `WASTEBIN_HTTP_TIMEOUT` | Maximum number of seconds a request can be processed until wastebin responds with 408 | 5 |
143+
| `WASTEBIN_MAX_BODY_SIZE` | Number of bytes to accept for POST requests. | 1048576, i.e. 1 MB |
144+
| `WASTEBIN_MAX_PASTE_EXPIRATION` | Maximum allowed lifetime of a paste in seconds. | 0, i.e. unlimited |
145+
| `WASTEBIN_PASSWORD_SALT` | Salt used to hash user passwords used for encrypting pastes. | `somesalt` |
146+
| `WASTEBIN_SIGNING_KEY` | Key to sign cookies, at least 64 bytes long. | Random key generated at startup, i.e. cookies will become invalid after restarts and paste creators will not be able to delete their pastes. |
147+
| `WASTEBIN_TITLE` | HTML page title. | `wastebin` |
148+
| `RUST_LOG` | Log level. Besides the typical `trace`, `debug`, `info` etc. keys, you can also set the `tower_http` key to some log level to get additional information request and response logs. | |
160149

161150

162151
### API endpoints

0 commit comments

Comments
 (0)