Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
565e8c0f97 | ||
|
|
a58b46f59c |
@@ -1,6 +1,6 @@
|
||||
export CONFIG_VERSION=v3
|
||||
export CONFIG_JS_VERSION=v2
|
||||
export NGINX_CONF_VERSION=v3
|
||||
export NGINX_CONF_VERSION=v4
|
||||
export INFRA_JS_VERSION=v1
|
||||
export SSO_ENTRYPOINT_VERSION=v8
|
||||
export SSO_JS_VERSION=v3
|
||||
|
||||
@@ -2,7 +2,7 @@ version: "3.8"
|
||||
|
||||
services:
|
||||
init-onlyoffice-dirs:
|
||||
image: busybox
|
||||
image: busybox:1.38.0
|
||||
user: root
|
||||
command:
|
||||
- sh
|
||||
|
||||
+1
-5
@@ -11,10 +11,6 @@ services:
|
||||
- CRYPTPAD_ADMIN_KEYS
|
||||
- "CPAD_MAIN_DOMAIN=https://${DOMAIN}"
|
||||
- "CPAD_SANDBOX_DOMAIN=https://${SANDBOX_DOMAIN}"
|
||||
# Traefik can't use HTTP2 to communicate with cryptpad_websocket
|
||||
# A workaroung is disabling HTTP2 in Nginx
|
||||
- "CPAD_HTTP2_DISABLE=true"
|
||||
- "CPAD_TRUST_PROXY=1"
|
||||
- "CPAD_CONF=/cryptpad/config/config.js"
|
||||
- "RESTRICT_GUEST_ACCESS=${RESTRICT_GUEST_ACCESS:-false}"
|
||||
volumes:
|
||||
@@ -48,7 +44,7 @@ services:
|
||||
start_period: 1m
|
||||
|
||||
web:
|
||||
image: nginx:1.31
|
||||
image: nginx:1.31.10
|
||||
configs:
|
||||
- source: nginx_conf
|
||||
target: /etc/nginx/conf.d/default.conf
|
||||
|
||||
+25
-4
@@ -1,3 +1,22 @@
|
||||
# Traefik terminates TLS and sets X-Forwarded-* / X-Real-IP. Pass its values
|
||||
# through to CryptPad instead of overwriting them with nginx's own view
|
||||
# (which would be plain http and Traefik's container IP). Fall back to
|
||||
# nginx's values when the headers are absent.
|
||||
map $http_x_forwarded_proto $forwarded_proto {
|
||||
default $http_x_forwarded_proto;
|
||||
"" $scheme;
|
||||
}
|
||||
|
||||
map $http_x_forwarded_host $forwarded_host {
|
||||
default $http_x_forwarded_host;
|
||||
"" $host;
|
||||
}
|
||||
|
||||
map $http_x_real_ip $forwarded_real_ip {
|
||||
default $http_x_real_ip;
|
||||
"" $remote_addr;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 8083;
|
||||
server_name localhost;
|
||||
@@ -17,9 +36,10 @@ server {
|
||||
proxy_pass $cryptpad_upstream;
|
||||
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Real-IP $forwarded_real_ip;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-Proto $forwarded_proto;
|
||||
proxy_set_header X-Forwarded-Host $forwarded_host;
|
||||
|
||||
client_max_body_size 150m;
|
||||
|
||||
@@ -33,9 +53,10 @@ server {
|
||||
proxy_pass $cryptpad_upstream;
|
||||
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Real-IP $forwarded_real_ip;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-Proto $forwarded_proto;
|
||||
proxy_set_header X-Forwarded-Host $forwarded_host;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
|
||||
Reference in New Issue
Block a user