mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-02-14 01:30:19 +00:00
add whiteboard container
Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
parent
9a4f132998
commit
546f11a654
14 changed files with 151 additions and 4 deletions
|
|
@ -51,6 +51,12 @@ https://{$ADDITIONAL_TRUSTED_DOMAIN}:443,
|
|||
reverse_proxy {$TALK_HOST}:8081
|
||||
}
|
||||
|
||||
# Whiteboard
|
||||
route /whiteboard/* {
|
||||
uri strip_prefix /whiteboard
|
||||
reverse_proxy {$WHITEBOARD_HOST}:3002
|
||||
}
|
||||
|
||||
# Nextcloud
|
||||
route {
|
||||
header Strict-Transport-Security max-age=31536000;
|
||||
|
|
|
|||
|
|
@ -851,5 +851,22 @@ else
|
|||
fi
|
||||
fi
|
||||
|
||||
# Whiteboard app
|
||||
if [ "$WHITEBOARD_ENABLED" = 'yes' ]; then
|
||||
if ! [ -d "/var/www/html/custom_apps/whiteboard" ]; then
|
||||
php /var/www/html/occ app:install whiteboard
|
||||
elif [ "$(php /var/www/html/occ config:app:get whiteboard enabled)" != "yes" ]; then
|
||||
php /var/www/html/occ app:enable whiteboard
|
||||
php /var/www/html/occ config:app:set whiteboard collabBackendUrl --value="https://$NC_DOMAIN/whiteboard"
|
||||
php /var/www/html/occ config:app:set whiteboard jwt_secret_key --value="$WHITEBOARD_SECRET"
|
||||
elif [ "$SKIP_UPDATE" != 1 ]; then
|
||||
php /var/www/html/occ app:update whiteboard
|
||||
fi
|
||||
else
|
||||
if [ "$REMOVE_DISABLED_APPS" = yes ] && [ -d "/var/www/html/custom_apps/whiteboard" ]; then
|
||||
php /var/www/html/occ app:remove whiteboard
|
||||
fi
|
||||
fi
|
||||
|
||||
# Remove the update skip file always
|
||||
rm -f "$NEXTCLOUD_DATA_DIR"/skip.update
|
||||
|
|
|
|||
8
Containers/whiteboard/Dockerfile
Normal file
8
Containers/whiteboard/Dockerfile
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# syntax=docker/dockerfile:latest
|
||||
FROM ghcr.io/nextcloud-releases/whiteboard:v1.0.1
|
||||
|
||||
COPY --chmod=775 start.sh /start.sh
|
||||
|
||||
ENTRYPOINT ["/start.sh"]
|
||||
|
||||
LABEL com.centurylinklabs.watchtower.enable="false"
|
||||
19
Containers/whiteboard/start.sh
Normal file
19
Containers/whiteboard/start.sh
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Only start container if nextcloud is accessible
|
||||
while ! nc -z "$REDIS_HOST" 6379; do
|
||||
echo "Waiting for redis to start..."
|
||||
sleep 5
|
||||
done
|
||||
|
||||
# Set a default for redis db index
|
||||
if [ -z "$REDIS_DB_INDEX" ]; then
|
||||
REDIS_DB_INDEX=0
|
||||
fi
|
||||
|
||||
export REDIS_URL="redis://:$REDIS_HOST_PASSWORD@$REDIS_HOST/$REDIS_DB_INDEX"
|
||||
|
||||
# Run it
|
||||
npm run server:start
|
||||
|
||||
exec "$@"
|
||||
Loading…
Add table
Add a link
Reference in a new issue