File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,14 +17,25 @@ Configuration precedence is:
17172 . ` .env `
18183 . ` SECRETS_DIR `
1919
20- If ` SECRETS_DIR ` is set, each file in that directory should be named after the
21- setting, and the file contents should be the value. For example:
20+ If ` SECRETS_DIR ` is set, it should point to a directory containing one file per
21+ secret. Each filename should match a setting name, and the file contents should
22+ be the value. This is useful for production deployments where you prefer
23+ OS-managed secret files instead of storing sensitive values in a ` .env ` file.
24+ Common locations include ` /etc/myapp/secrets ` on Linux servers,
25+ ` /run/secrets ` in containers, ` ./secrets ` for local testing, or a custom path
26+ on Windows. For example:
2227
2328``` text
2429/run/secrets/DB_PASSWORD
2530/run/secrets/SECRET_KEY
2631```
2732
33+ The directory should be readable only by the account running the application
34+ and protected with appropriate filesystem permissions. This improves separation
35+ of secrets from source code and deployment files, but it does not replace
36+ proper host security: an attacker with full system access may still be able to
37+ obtain them.
38+
2839!!! info
2940 The Database (and test database if you are running the tests) and User must
3041 already exist in your Postgres system!
You can’t perform that action at this time.
0 commit comments