-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move filesystem config into .env instead of Settings
- Loading branch information
Showing
6 changed files
with
122 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,15 @@ MAILER_DSN=smtp://localhost | |
APP_MAIN_CONTACT=1 | ||
APP_REQUIRE_2FA=true | ||
|
||
APP_FS_DATA_STORE=local | ||
APP_FS_DATA_DIR= | ||
APP_FS_TEMP_DIR= | ||
APP_FS_AWS_REGION= | ||
APP_FS_AWS_ENDPOINT= | ||
APP_FS_AWS_BUCKET= | ||
APP_FS_AWS_KEY= | ||
APP_FS_AWS_SECRET= | ||
|
||
APP_MAIL_SENDER=[email protected] | ||
APP_LOG_RECIPIENT=[email protected] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,12 +4,55 @@ Configuration | |
============= | ||
|
||
All the important parts of configuration of a Twyne site | ||
happen in the ``.env.local`` file:: | ||
happen in the ``.env.local`` file. | ||
The minimum that should be set are as follows: | ||
|
||
APP_SECRET=a-long-random-string | ||
[email protected] | ||
[email protected] | ||
MAILER_DSN=smtp://username:[email protected] | ||
.. code-block:: shell | ||
Other configuration happens on the Settings page, | ||
APP_SECRET=a-long-random-string | ||
[email protected] | ||
[email protected] | ||
MAILER_DSN=smtp://username:[email protected] | ||
Other configuration | ||
(that is likely to be changed occasionally during the normal operation of the site) | ||
happens on the Settings page, | ||
accessible via the main menu. | ||
|
||
Uploaded files | ||
-------------- | ||
|
||
There are two options for file storage: the local filesystem, and S3_-compatible object stores | ||
(such as those from AWS, Digital Ocean, OVH, Dreamhost, etc.). | ||
|
||
.. _S3: https://en.wikipedia.org/wiki/Amazon_S3 | ||
|
||
The local filesystem is the default, and files will be stored in the ``var/app_data/`` directory. | ||
This location can be changed via ``.env.local``: | ||
|
||
.. code-block:: shell | ||
APP_FS_DATA_DIR=/path/to/your/data_dir/ | ||
To use S3-compatible storage, set the following environment variables: | ||
|
||
.. code-block:: shell | ||
APP_FS_DATA_STORE=aws | ||
APP_FS_AWS_REGION= | ||
APP_FS_AWS_ENDPOINT= | ||
APP_FS_AWS_BUCKET= | ||
APP_FS_AWS_KEY= | ||
APP_FS_AWS_SECRET= | ||
Uploaded files will have various derivative files created for them, such as thumbnails of images. | ||
These files will be stored in the ``var/app_temp/`` directory by default. | ||
This directory can be changed in ``.env.local``: | ||
|
||
.. code-block:: shell | ||
APP_FS_TEMP_DIR=/path/to/your/tmp_dir/ | ||
The temporary directory contains only files that will be regenerated as required | ||
(hence the name 'temporary'; these are however long-lived files). | ||
There is no need to back up this directory. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters