mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-06-30 16:04:40 -05:00
Add SWAG configuration
parent
d6878adedc
commit
5d32b1f08a
@ -1,4 +1,4 @@
|
||||
[Nginx](#nginx) | [Apache](#apache) | [Caddy](#caddy) | [Traefik](#traefik)
|
||||
[Nginx](#nginx) | [Apache](#apache) | [Caddy](#caddy) | [Traefik](#traefik) | [SWAG](#SWAG)
|
||||
|
||||
If you want to expose paperless to the internet, you should hide it
|
||||
behind a reverse proxy with SSL enabled. The officially supported method is Nginx.
|
||||
@ -230,4 +230,38 @@ Below is an example Traefik configuration you would add to the webserver contain
|
||||
- "traefik.http.routers.paperless.tls=true"
|
||||
- "traefik.http.routers.paperless.tls.certresolver=letsencrypt"
|
||||
- "traefik.http.services.paperless.loadbalancer.server.port=8000"
|
||||
```
|
||||
|
||||
# SWAG
|
||||
|
||||
Below is an example of one way to configure SWAG for paperless-ngx
|
||||
|
||||
Add the Auto-Proxy dockermod to the SWAG container.
|
||||
This mod needs the universal-docker mod installed and set up with either mapping docker.sock or setting the environment variable DOCKER_HOST=remoteaddress.
|
||||
|
||||
To add the dockermod with read only mapping to docker.sock, add the folling to the compose for the SWAG container:
|
||||
|
||||
```
|
||||
environment:
|
||||
- DOCKER_MODS=linuxserver/mods:universal-docker|linuxserver/mods:swag-auto-proxy
|
||||
|
||||
volumes:
|
||||
- '/var/run/docker.sock:/var/run/docker.sock:ro'
|
||||
```
|
||||
Full documentation for Auto-Proxy here:
|
||||
https://github.com/linuxserver/docker-mods/tree/swag-auto-proxy
|
||||
|
||||
|
||||
Below is an example SWAG configuration you would add to the webserver container.
|
||||
|
||||
Change the swag_url to match your own.
|
||||
|
||||
```
|
||||
labels:
|
||||
- swag=enable
|
||||
- swag_url=paperless.mydomain.com
|
||||
- swag_server_custom_directive=proxy_redirect off;
|
||||
- swag_server_custom_directive=proxy_set_header Host $host:$server_port;
|
||||
- swag_server_custom_directive=proxy_set_header X-Forwarded-Host $server_name;
|
||||
- swag_server_custom_directive=add_header Referrer-Policy "strict-origin-when-cross-origin";
|
||||
```
|
Loading…
x
Reference in New Issue
Block a user