mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-19 22:16:49 +00:00
make collabora work
Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
parent
e8d66a06d1
commit
09bbe2fd87
4 changed files with 30 additions and 8 deletions
|
|
@ -233,7 +233,8 @@ RUN set -ex; \
|
||||||
chmod +x /entrypoint.sh && \
|
chmod +x /entrypoint.sh && \
|
||||||
chmod +r /upgrade.exclude && \
|
chmod +r /upgrade.exclude && \
|
||||||
chmod +x /cron.sh && \
|
chmod +x /cron.sh && \
|
||||||
chmod +x /notify.sh
|
chmod +x /notify.sh && \
|
||||||
|
chmod +x /activate-collabora.sh
|
||||||
|
|
||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
mkdir /mnt/ncdata; \
|
mkdir /mnt/ncdata; \
|
||||||
|
|
|
||||||
20
Containers/nextcloud/activate-collabora.sh
Normal file
20
Containers/nextcloud/activate-collabora.sh
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
COLLABORA_ACTIVATED=0
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
if [ "$COLLABORA_ENABLED" != yes ]; then
|
||||||
|
# Basically sleep for forever if collabora is not enabled
|
||||||
|
sleep 365d
|
||||||
|
fi
|
||||||
|
if [ "$COLLABORA_ACTIVATED" != 0 ]; then
|
||||||
|
# Basically sleep for forever if collabora was activated
|
||||||
|
sleep 365d
|
||||||
|
fi
|
||||||
|
while ! nc -z "$NC_DOMAIN" 443; do
|
||||||
|
sleep 5
|
||||||
|
done
|
||||||
|
echo "Activating collabora config"
|
||||||
|
php /var/www/html/occ richdocuments:activate-config
|
||||||
|
COLLABORA_ACTIVATED=1
|
||||||
|
done
|
||||||
|
|
@ -283,10 +283,6 @@ php /var/www/html/occ config:app:set notify_push base_endpoint --value="https://
|
||||||
|
|
||||||
# Collabora
|
# Collabora
|
||||||
if [ "$COLLABORA_ENABLED" = 'yes' ]; then
|
if [ "$COLLABORA_ENABLED" = 'yes' ]; then
|
||||||
while ! nc -z "$COLLABORA_HOST" 9980; do
|
|
||||||
echo "waiting for Collabora to become available..."
|
|
||||||
sleep 5
|
|
||||||
done
|
|
||||||
if ! [ -d "/var/www/html/custom_apps/richdocuments" ]; then
|
if ! [ -d "/var/www/html/custom_apps/richdocuments" ]; then
|
||||||
php /var/www/html/occ app:install richdocuments
|
php /var/www/html/occ app:install richdocuments
|
||||||
elif [ "$(php /var/www/html/occ config:app:get richdocuments enabled)" = "no" ]; then
|
elif [ "$(php /var/www/html/occ config:app:get richdocuments enabled)" = "no" ]; then
|
||||||
|
|
@ -294,11 +290,9 @@ if [ "$COLLABORA_ENABLED" = 'yes' ]; then
|
||||||
else
|
else
|
||||||
php /var/www/html/occ app:update richdocuments
|
php /var/www/html/occ app:update richdocuments
|
||||||
fi
|
fi
|
||||||
|
php /var/www/html/occ config:app:set richdocuments wopi_url --value="https://$NC_DOMAIN/"
|
||||||
# Fix https://github.com/nextcloud/all-in-one/issues/188:
|
# Fix https://github.com/nextcloud/all-in-one/issues/188:
|
||||||
php /var/www/html/occ config:system:set allow_local_remote_servers --type=bool --value=true
|
php /var/www/html/occ config:system:set allow_local_remote_servers --type=bool --value=true
|
||||||
php /var/www/html/occ config:app:set richdocuments wopi_url --value="http://$COLLABORA_HOST:9980/"
|
|
||||||
php /var/www/html/occ config:app:set richdocuments public_wopi_url --value="https://$NC_DOMAIN/"
|
|
||||||
php /var/www/html/occ richdocuments:activate-config
|
|
||||||
else
|
else
|
||||||
if [ -d "/var/www/html/custom_apps/richdocuments" ]; then
|
if [ -d "/var/www/html/custom_apps/richdocuments" ]; then
|
||||||
php /var/www/html/occ config:system:delete allow_local_remote_servers
|
php /var/www/html/occ config:system:delete allow_local_remote_servers
|
||||||
|
|
|
||||||
|
|
@ -28,3 +28,10 @@ stdout_logfile_maxbytes=0
|
||||||
stderr_logfile=/dev/stderr
|
stderr_logfile=/dev/stderr
|
||||||
stderr_logfile_maxbytes=0
|
stderr_logfile_maxbytes=0
|
||||||
command=/var/www/html/custom_apps/notify_push/bin/%(ENV_CPU_ARCH)s/notify_push /var/www/html/config/config.php --port 7867 --redis-url redis://:%(ENV_REDIS_HOST_PASSWORD)s@%(ENV_REDIS_HOST)s
|
command=/var/www/html/custom_apps/notify_push/bin/%(ENV_CPU_ARCH)s/notify_push /var/www/html/config/config.php --port 7867 --redis-url redis://:%(ENV_REDIS_HOST_PASSWORD)s@%(ENV_REDIS_HOST)s
|
||||||
|
|
||||||
|
[program:activate-collabora]
|
||||||
|
stdout_logfile=/dev/stdout
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/dev/stderr
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
|
command=/activate-collabora.sh
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue