@@ -11,40 +11,49 @@ Please read these notes before continuing.
1111- A HTTPS connection at endpoint is required for the "Copy Share Link" button
1212- Use HTTPS otherwise paste links are exposed to man-in-the-middle attacks
1313- If you have a high amount of clients, use Redis caching and set ` WORKERS ` to match the physical cpu cores
14+ - If using S3 the bucket should already be created with read/write access
15+ - S3 currently has been tested with [ MinIO] ( https://min.io/ ) (can self-host)
1416
1517## Configuration
1618All configs shown here should be given as environment variables.
1719
18- | Name | Description | Default | Docker Default |
19- | :------------------------------- | :----------------------------------------------------------------- | :------------ | :------------- |
20- | PASTE_ROOT | Where the paste flat file system will be kept | | /app/data |
21- | TIME_ZONE | The time-zone where your clients are (used in web UI) | Europe/London | Europe/London |
22- | NEW_AT_INDEX | Index page displays new paste page instead | False | False |
23- | ENABLE_PUBLIC_LIST | Whether to enable public access for listing pastes | False | False |
24- | | | | |
25- | UI_DEFAULT__ USE_LONG_ID | Setting this to "True" or "False" hides the long id checkbox in UI | False | False |
26- | UI_DEFAULT__ EXPIRE_TIME__ ENABLE | Enable a default expire time in web ui | False | False |
27- | UI_DEFAULT__ EXPIRE_TIME__ MINUTES | Default minutes in ui for expiry if enabled | 0 | 0 |
28- | UI_DEFAULT__ EXPIRE_TIME__ HOURS | Default hours in ui for expiry if enabled | 1 | 1 |
29- | UI_DEFAULT__ EXPIRE_TIME__ DAYS | Default days in ui for expiry if enabled | 0 | 0 |
30- | | | | |
31- | CACHE__ ENABLE | Whether to enable caching of any type | True | True |
32- | CACHE__ INTERNAL_MAX_SIZE | The max size of the internal cache (<=0 to disable) | 4 | 4 |
33- | CACHE__ REDIS_URI | Use redis for caching | - | - |
34- | | | | |
35- | BRANDING__ TITLE | Customise the app title | - | - |
36- | BRANDING__ DESCRIPTION | Customise the app description | - | - |
37- | BRANDING__ ICON | Customise the app icon, provide as absolute filepath | - | - |
38- | BRANDING__ FAVICON | Customise the app favicon, provide as absolute filepath | - | - |
39- | BRANDING__ CSS_FILE | Customise the site theme, using a provided css file | - | - |
40- | BRANDING__ HIDE_VERSION | Hide the app version number | False | False |
41- | | | | |
42- | MAX_BODY_SIZE | The max body size, given in bytes | 2000000 | 2000000 |
43- | LOG_LEVEL | What log level to use | "WARNING" | "WARNING" |
44- | | | | |
45- | WORKERS | Number of separate processes to spawn | (Docker Only) | 1 |
46- | CERT_FILE | SSL certificate file path (public) | (Docker Only) | - |
47- | KEY_FILE | SSL key file path (private) | (Docker Only) | - |
20+ | Name | Description | Default | Docker Default |
21+ | :------------------------------- | :------------------------------------------------------ | :------------ | :------------- |
22+ | TIME_ZONE | The time-zone where your clients are (used in web UI) | Europe/London | Europe/London |
23+ | NEW_AT_INDEX | Index page displays new paste page instead | False | False |
24+ | ENABLE_PUBLIC_LIST | Whether to enable public access for listing pastes | False | False |
25+ | USE_LONG_ID | When "True" pastes will use a longer id | False | False |
26+ | | | | |
27+ | UI_DEFAULT__ EXPIRE_TIME__ ENABLE | Enable a default expire time in web ui | False | False |
28+ | UI_DEFAULT__ EXPIRE_TIME__ MINUTES | Default minutes in ui for expiry if enabled | 0 | 0 |
29+ | UI_DEFAULT__ EXPIRE_TIME__ HOURS | Default hours in ui for expiry if enabled | 1 | 1 |
30+ | UI_DEFAULT__ EXPIRE_TIME__ DAYS | Default days in ui for expiry if enabled | 0 | 0 |
31+ | | | | |
32+ | STORAGE__ TYPE | What storage type to use (DISK, S3) | DISK | DISK |
33+ | STORAGE__ DISK__ PASTE_ROOT | Where the paste flat file system will be kept | - | /app/data |
34+ | STORAGE__ S3__ ENDPOINT_URL | Use a different endpoint other than AWS | - | - |
35+ | STORAGE__ S3__ ACCESS_KEY_ID | Access key ID | - | - |
36+ | STORAGE__ S3__ SECRET_ACCESS_KEY | Access key secret | - | - |
37+ | STORAGE__ S3__ BUCKET_NAME | Bucket name to store pastes (should already be created) | - | - |
38+ | | | | |
39+ | CACHE__ ENABLE | Whether to enable caching of any type | True | True |
40+ | CACHE__ INTERNAL_MAX_SIZE | The max size of the internal cache (<=0 to disable) | 4 | 4 |
41+ | CACHE__ REDIS_URI | Use redis for caching | - | - |
42+ | | | | |
43+ | BRANDING__ TITLE | Customise the app title | - | - |
44+ | BRANDING__ DESCRIPTION | Customise the app description | - | - |
45+ | BRANDING__ ICON | Customise the app icon, provide as absolute filepath | - | - |
46+ | BRANDING__ FAVICON | Customise the app favicon, provide as absolute filepath | - | - |
47+ | BRANDING__ CSS_FILE | Customise the site theme, using a provided css file | - | - |
48+ | BRANDING__ HIDE_VERSION | Hide the app version number | False | False |
49+ | | | | |
50+ | MAX_BODY_SIZE | The max body size, given in bytes | 2000000 | 2000000 |
51+ | LOG_LEVEL | What log level to use | "WARNING" | "WARNING" |
52+ | HIDE_BOOT_MESSAGE | Hide the ascii art boot message | False | False |
53+ | | | | |
54+ | WORKERS | Number of separate processes to spawn | (Docker Only) | 1 |
55+ | CERT_FILE | SSL certificate file path (public) | (Docker Only) | - |
56+ | KEY_FILE | SSL key file path (private) | (Docker Only) | - |
4857
4958> Default values indicated with '-' are not required
5059
@@ -131,6 +140,27 @@ volumes:
131140 data :
132141` ` `
133142
143+ ### With S3
144+
145+ ` ` ` yml
146+ version : " 3"
147+
148+ services :
149+ paste-bin :
150+ container_name : paste-bin
151+ image : ghcr.io/enchant97/hasty-paste:1
152+ restart : unless-stopped
153+ ports :
154+ - 8000:8000
155+ environment :
156+ - " TIME_ZONE=Europe/London"
157+ - " STORAGE__TYPE=S3"
158+ - " STORAGE__S3__BUCKET_NAME=" hasty-paste"
159+ - " STORAGE__S3__ACCESS_KEY_ID=< key id here >"
160+ - " STORAGE__S3__SECRET_ACCESS_KEY=< secret access key here >"
161+
162+ ```
163+
134164## Without Docker
135165This will assume the supported Python version is installed and accessible.
136166
0 commit comments