Skip to content

Commit fe48ffc

Browse files
committed
add instructions for CF
1 parent c64849c commit fe48ffc

2 files changed

Lines changed: 45 additions & 1 deletion

File tree

docs/settings/main.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,40 @@ Example:
2121
PAPERMERGE__MAIN__LOGGING_CFG=/etc/papermerge/logging.yaml
2222

2323

24+
## MAIN__FILE_SERVER
25+
26+
Context: `webapp`.
27+
Who is serving document files? Is it `webapp` ? or CDN?
28+
This environment variable can have two values:
29+
30+
* `local` (default)
31+
* `s3`
32+
33+
With `local` (which is set by default), `webapp` is the one serving document files.
34+
With `s3` is CDN serving document files. At this point only AWS CloudFront is supported as CDN.
35+
If `PAPERMERGE__MAIN__FILE_SERVER=s3` then you need to provide following environment variables:
36+
37+
* `PAPERMERGE__MAIN__CF_SIGN_URL_PRIVATE_KEY`
38+
* `PAPERMERGE__MAIN__CF_SIGN_URL_KEY_ID`
39+
* `PAPERMERGE__MAIN__CF_DOMAIN`
40+
41+
42+
## MAIN__CF_SIGN_URL_PRIVATE_KEY
43+
44+
Used only in combination with `PAPERMERGE__MAIN__FILE_SERVER=s3`.
45+
`PAPERMERGE__MAIN__CF_SIGN_URL_PRIVATE_KEY` is the Cloud Front private key (as string).
46+
47+
## MAIN__CF_SIGN_URL_KEY_ID
48+
49+
Used only in combination with `PAPERMERGE__MAIN__FILE_SERVER=s3`.
50+
`MAIN__CF_SIGN_URL_KEY_ID` is the Cloud Front (CF) sign url key id.
51+
52+
## MAIN__CF_DOMAIN
53+
54+
Used only in combination with `PAPERMERGE__MAIN__FILE_SERVER=s3`.
55+
`MAIN__CF_DOMAIN` is the Cloud Front (CF) domain.
56+
57+
2458
## MAIN__TIMEZONE
2559

2660
Which timezone to use.

docs/setup/s3backend.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,4 +139,14 @@ $ pmcompose -u admin -p 1234 -lc -s3
139139

140140
## Content Delivery
141141

142-
docs: work in progress
142+
To enable files delivery via CDN, you need to set, in `webapp`, `PAPERMERGE__MAIN__FILE_SERVER` to `s3`:
143+
144+
`PAPERMERGE__MAIN__FILE_SERVER=s3`
145+
146+
At this point the only CDN provider which can be used with {{extra.project}} is AWS Cloud Front.
147+
Besides `PAPERMERGE__MAIN__FILE_SERVER=s3`, you need to set, on `webapp`, following, cloud front specific,
148+
environment variables (CF=AWS Cloud Front):
149+
150+
* `PAPERMERGE__MAIN__CF_SIGN_URL_PRIVATE_KEY`
151+
* `PAPERMERGE__MAIN__CF_SIGN_URL_KEY_ID`
152+
* `PAPERMERGE__MAIN__CF_DOMAIN`

0 commit comments

Comments
 (0)