mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-02-04 04:56:52 +00:00
allow to run this behind a reverse proxy
Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
parent
704c4ad331
commit
6e9261f306
10 changed files with 84 additions and 9 deletions
|
|
@ -6,7 +6,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
https://{$NC_DOMAIN}:443 {
|
||||
{$PROTOCOL}://{$NC_DOMAIN}:{$APACHE_PORT} {
|
||||
|
||||
# Notify Push
|
||||
route /push/* {
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ COPY start.sh /usr/bin/
|
|||
COPY supervisord.conf /
|
||||
RUN chmod +x /usr/bin/start.sh; \
|
||||
chmod +r /supervisord.conf; \
|
||||
chmod +r /Caddyfile;
|
||||
chmod +w /Caddyfile;
|
||||
|
||||
# Give root a random password
|
||||
RUN echo "root:$(openssl rand -base64 12)" | chpasswd
|
||||
|
|
|
|||
|
|
@ -23,6 +23,19 @@ while ! nc -z "$COLLABORA_HOST" 9980; do
|
|||
sleep 5
|
||||
done
|
||||
|
||||
if [ -z "$APACHE_PORT" ]; then
|
||||
export APACHE_PORT="443"
|
||||
fi
|
||||
|
||||
if [ "$APACHE_PORT" != '443' ]; then
|
||||
export PROTOCOL="http"
|
||||
export NC_DOMAIN=""
|
||||
sed -i 's|auto_https.*|auto_https off|' /Caddyfile
|
||||
else
|
||||
export PROTOCOL="https"
|
||||
sed -i 's|auto_https.*|auto_https disable_redirects|' /Caddyfile
|
||||
fi
|
||||
|
||||
# Add caddy path
|
||||
mkdir -p /mnt/data/caddy/
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue