web,etherpad: add etherpad addon for sharing document
This commit is contained in:
committed by
Saúl Ibarra Corretgé
parent
2f9192c238
commit
62f2d11cab
@@ -32,3 +32,19 @@ location /http-bind {
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header Host {{ .Env.XMPP_DOMAIN }};
|
||||
}
|
||||
|
||||
{{ if .Env.ETHERPAD_URL_BASE }}
|
||||
# Etherpad-lite
|
||||
location /etherpad/ {
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_set_header Host $host;
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
|
||||
proxy_pass {{ .Env.ETHERPAD_URL_BASE }}/;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_buffering off;
|
||||
proxy_set_header Host {{ .Env.XMPP_DOMAIN }};
|
||||
}
|
||||
{{ end }}
|
||||
|
||||
@@ -72,6 +72,12 @@ if [[ ! -f /config/config.js ]]; then
|
||||
-e "s#// authdomain:.*#authdomain: '${XMPP_DOMAIN}',#" \
|
||||
/config/config.js
|
||||
fi
|
||||
|
||||
if [[ ! -z "${ETHERPAD_URL_BASE}" && -z "$(grep -om1 'etherpad_base:' /config/config.js)" ]]; then
|
||||
sed -i \
|
||||
-e "/enableWelcomePage/a\ etherpad_base: '/etherpad/p/'," \
|
||||
/config/config.js
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ! -f /config/interface_config.js ]]; then
|
||||
|
||||
Reference in New Issue
Block a user