mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-19 22:16:49 +00:00
Merge pull request #5274 from nextcloud/enh/5063/add-whiteboard
add whiteboard container
This commit is contained in:
commit
b3f63e5f74
16 changed files with 153 additions and 6 deletions
9
.github/dependabot.yml
vendored
9
.github/dependabot.yml
vendored
|
|
@ -183,3 +183,12 @@ updates:
|
||||||
labels:
|
labels:
|
||||||
- 3. to review
|
- 3. to review
|
||||||
- dependencies
|
- dependencies
|
||||||
|
- package-ecosystem: "docker"
|
||||||
|
directory: "/Containers/whiteboard"
|
||||||
|
schedule:
|
||||||
|
interval: "daily"
|
||||||
|
time: "12:00"
|
||||||
|
open-pull-requests-limit: 10
|
||||||
|
labels:
|
||||||
|
- 3. to review
|
||||||
|
- dependencies
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,12 @@ https://{$ADDITIONAL_TRUSTED_DOMAIN}:443,
|
||||||
reverse_proxy {$TALK_HOST}:8081
|
reverse_proxy {$TALK_HOST}:8081
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Whiteboard
|
||||||
|
route /whiteboard/* {
|
||||||
|
uri strip_prefix /whiteboard
|
||||||
|
reverse_proxy {$WHITEBOARD_HOST}:3002
|
||||||
|
}
|
||||||
|
|
||||||
# Nextcloud
|
# Nextcloud
|
||||||
route {
|
route {
|
||||||
header Strict-Transport-Security max-age=31536000;
|
header Strict-Transport-Security max-age=31536000;
|
||||||
|
|
|
||||||
|
|
@ -851,5 +851,22 @@ else
|
||||||
fi
|
fi
|
||||||
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
|
# Remove the update skip file always
|
||||||
rm -f "$NEXTCLOUD_DATA_DIR"/skip.update
|
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"
|
||||||
17
Containers/whiteboard/start.sh
Normal file
17
Containers/whiteboard/start.sh
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
#!/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
|
||||||
|
exec npm run server:start
|
||||||
|
|
@ -30,9 +30,9 @@ Now copy the provided yaml file to a compose.yaml file by running `cp latest.yml
|
||||||
Now you should be ready to go with `sudo docker compose up`.
|
Now you should be ready to go with `sudo docker compose up`.
|
||||||
|
|
||||||
## Docker profiles
|
## Docker profiles
|
||||||
The default profile of `latest.yml` only provide the minimum necessary services: nextcloud, database, redis and apache. To get optional services collabora, talk, talk-recording, clamav, imaginary or fulltextsearch use additional arguments for each of them, for example `--profile collabora`. (Note: there is no clamav image for arm64).
|
The default profile of `latest.yml` only provide the minimum necessary services: nextcloud, database, redis and apache. To get optional services collabora, talk, whiteboard, talk-recording, clamav, imaginary or fulltextsearch use additional arguments for each of them, for example `--profile collabora`. (Note: there is no clamav image for arm64).
|
||||||
|
|
||||||
For a complete all-in-one with collabora use `sudo docker compose --profile collabora --profile talk --profile talk-recording --profile clamav --profile imaginary --profile fulltextsearch up`. (Note: there is no clamav image for arm64).
|
For a complete all-in-one with collabora use `sudo docker compose --profile collabora --profile talk --profile talk-recording --profile clamav --profile imaginary --profile fulltextsearch --profile whiteboard up`. (Note: there is no clamav image for arm64).
|
||||||
|
|
||||||
## How to update?
|
## How to update?
|
||||||
Since the AIO containers may change in the future, it is highly recommended to strictly follow the following procedure whenever you want to upgrade your containers.
|
Since the AIO containers may change in the future, it is highly recommended to strictly follow the following procedure whenever you want to upgrade your containers.
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,8 @@
|
||||||
"nextcloud-aio-collabora",
|
"nextcloud-aio-collabora",
|
||||||
"nextcloud-aio-talk",
|
"nextcloud-aio-talk",
|
||||||
"nextcloud-aio-nextcloud",
|
"nextcloud-aio-nextcloud",
|
||||||
"nextcloud-aio-notify-push"
|
"nextcloud-aio-notify-push",
|
||||||
|
"nextcloud-aio-whiteboard"
|
||||||
],
|
],
|
||||||
"display_name": "Apache",
|
"display_name": "Apache",
|
||||||
"image": "nextcloud/aio-apache",
|
"image": "nextcloud/aio-apache",
|
||||||
|
|
@ -37,7 +38,8 @@
|
||||||
"TZ=%TIMEZONE%",
|
"TZ=%TIMEZONE%",
|
||||||
"APACHE_MAX_SIZE=%APACHE_MAX_SIZE%",
|
"APACHE_MAX_SIZE=%APACHE_MAX_SIZE%",
|
||||||
"APACHE_MAX_TIME=%NEXTCLOUD_MAX_TIME%",
|
"APACHE_MAX_TIME=%NEXTCLOUD_MAX_TIME%",
|
||||||
"NOTIFY_PUSH_HOST=nextcloud-aio-notify-push"
|
"NOTIFY_PUSH_HOST=nextcloud-aio-notify-push",
|
||||||
|
"WHITEBOARD_HOST=nextcloud-aio-whiteboard"
|
||||||
],
|
],
|
||||||
"volumes": [
|
"volumes": [
|
||||||
{
|
{
|
||||||
|
|
@ -148,7 +150,8 @@
|
||||||
"TURN_SECRET",
|
"TURN_SECRET",
|
||||||
"SIGNALING_SECRET",
|
"SIGNALING_SECRET",
|
||||||
"FULLTEXTSEARCH_PASSWORD",
|
"FULLTEXTSEARCH_PASSWORD",
|
||||||
"IMAGINARY_SECRET"
|
"IMAGINARY_SECRET",
|
||||||
|
"WHITEBOARD_SECRET"
|
||||||
],
|
],
|
||||||
"volumes": [
|
"volumes": [
|
||||||
{
|
{
|
||||||
|
|
@ -224,7 +227,9 @@
|
||||||
"APACHE_PORT=%APACHE_PORT%",
|
"APACHE_PORT=%APACHE_PORT%",
|
||||||
"ADDITIONAL_TRUSTED_PROXY=%CADDY_IP_ADDRESS%",
|
"ADDITIONAL_TRUSTED_PROXY=%CADDY_IP_ADDRESS%",
|
||||||
"THIS_IS_AIO=true",
|
"THIS_IS_AIO=true",
|
||||||
"IMAGINARY_SECRET=%IMAGINARY_SECRET%"
|
"IMAGINARY_SECRET=%IMAGINARY_SECRET%",
|
||||||
|
"WHITEBOARD_SECRET=%WHITEBOARD_SECRET%",
|
||||||
|
"WHITEBOARD_ENABLED=%WHITEBOARD_ENABLED%"
|
||||||
],
|
],
|
||||||
"stop_grace_period": 600,
|
"stop_grace_period": 600,
|
||||||
"restart": "unless-stopped",
|
"restart": "unless-stopped",
|
||||||
|
|
@ -746,6 +751,39 @@
|
||||||
"cap_drop": [
|
"cap_drop": [
|
||||||
"NET_RAW"
|
"NET_RAW"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"container_name": "nextcloud-aio-whiteboard",
|
||||||
|
"image_tag": "%AIO_CHANNEL%",
|
||||||
|
"display_name": "Whiteboard",
|
||||||
|
"image": "nextcloud/aio-whiteboard",
|
||||||
|
"init": true,
|
||||||
|
"expose": [
|
||||||
|
"3002"
|
||||||
|
],
|
||||||
|
"internal_port": "3002",
|
||||||
|
"environment": [
|
||||||
|
"TZ=%TIMEZONE%",
|
||||||
|
"NEXTCLOUD_URL=https://%NC_DOMAIN%",
|
||||||
|
"JWT_SECRET_KEY=%WHITEBOARD_SECRET%",
|
||||||
|
"STORAGE_STRATEGY=redis",
|
||||||
|
"REDIS_HOST=nextcloud-aio-redis",
|
||||||
|
"REDIS_HOST_PASSWORD=%REDIS_PASSWORD%"
|
||||||
|
],
|
||||||
|
"secrets": [
|
||||||
|
"WHITEBOARD_SECRET",
|
||||||
|
"REDIS_PASSWORD"
|
||||||
|
],
|
||||||
|
"restart": "unless-stopped",
|
||||||
|
"profiles": [
|
||||||
|
"whiteboard"
|
||||||
|
],
|
||||||
|
"networks": [
|
||||||
|
"nextcloud-aio"
|
||||||
|
],
|
||||||
|
"cap_drop": [
|
||||||
|
"NET_RAW"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
5
php/public/disable-whiteboard.js
Normal file
5
php/public/disable-whiteboard.js
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
document.addEventListener("DOMContentLoaded", function(event) {
|
||||||
|
// Whiteboard
|
||||||
|
let whiteboard = document.getElementById("whiteboard");
|
||||||
|
whiteboard.disabled = true;
|
||||||
|
});
|
||||||
|
|
@ -125,6 +125,7 @@ $app->get('/containers', function (Request $request, Response $response, array $
|
||||||
'is_dri_device_enabled' => $configurationManager->isDriDeviceEnabled(),
|
'is_dri_device_enabled' => $configurationManager->isDriDeviceEnabled(),
|
||||||
'is_talk_recording_enabled' => $configurationManager->isTalkRecordingEnabled(),
|
'is_talk_recording_enabled' => $configurationManager->isTalkRecordingEnabled(),
|
||||||
'is_docker_socket_proxy_enabled' => $configurationManager->isDockerSocketProxyEnabled(),
|
'is_docker_socket_proxy_enabled' => $configurationManager->isDockerSocketProxyEnabled(),
|
||||||
|
'is_whiteboard_enabled' => $configurationManager->isWhiteboardEnabled(),
|
||||||
]);
|
]);
|
||||||
})->setName('profile');
|
})->setName('profile');
|
||||||
$app->get('/login', function (Request $request, Response $response, array $args) use ($container) {
|
$app->get('/login', function (Request $request, Response $response, array $args) use ($container) {
|
||||||
|
|
|
||||||
|
|
@ -66,4 +66,8 @@ document.addEventListener("DOMContentLoaded", function(event) {
|
||||||
dockerSocketProxy.addEventListener('change', makeOptionsFormSubmitVisible);
|
dockerSocketProxy.addEventListener('change', makeOptionsFormSubmitVisible);
|
||||||
// dockerSocketProxy.addEventListener('change', handleDockerSocketProxyWarning);
|
// dockerSocketProxy.addEventListener('change', handleDockerSocketProxyWarning);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Whiteboard
|
||||||
|
let whiteboard = document.getElementById("whiteboard");
|
||||||
|
whiteboard.addEventListener('change', makeOptionsFormSubmitVisible);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -95,6 +95,10 @@ class ContainerDefinitionFetcher
|
||||||
if (!$this->configurationManager->isDockerSocketProxyEnabled()) {
|
if (!$this->configurationManager->isDockerSocketProxyEnabled()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
} elseif ($entry['container_name'] === 'nextcloud-aio-whiteboard') {
|
||||||
|
if (!$this->configurationManager->isWhiteboardEnabled()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$ports = new ContainerPorts();
|
$ports = new ContainerPorts();
|
||||||
|
|
@ -200,6 +204,10 @@ class ContainerDefinitionFetcher
|
||||||
if (!$this->configurationManager->isDockerSocketProxyEnabled()) {
|
if (!$this->configurationManager->isDockerSocketProxyEnabled()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
} elseif ($value === 'nextcloud-aio-whiteboard') {
|
||||||
|
if (!$this->configurationManager->isWhiteboardEnabled()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$dependsOn[] = $value;
|
$dependsOn[] = $value;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -120,6 +120,11 @@ class ConfigurationController
|
||||||
} else {
|
} else {
|
||||||
$this->configurationManager->SetDockerSocketProxyEnabledState(0);
|
$this->configurationManager->SetDockerSocketProxyEnabledState(0);
|
||||||
}
|
}
|
||||||
|
if (isset($request->getParsedBody()['whiteboard'])) {
|
||||||
|
$this->configurationManager->SetWhiteboardEnabledState(1);
|
||||||
|
} else {
|
||||||
|
$this->configurationManager->SetWhiteboardEnabledState(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($request->getParsedBody()['delete_collabora_dictionaries'])) {
|
if (isset($request->getParsedBody()['delete_collabora_dictionaries'])) {
|
||||||
|
|
|
||||||
|
|
@ -164,6 +164,21 @@ class ConfigurationManager
|
||||||
$this->WriteConfig($config);
|
$this->WriteConfig($config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function isWhiteboardEnabled() : bool {
|
||||||
|
$config = $this->GetConfig();
|
||||||
|
if (isset($config['isWhiteboardEnabled']) && $config['isWhiteboardEnabled'] === 1) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function SetWhiteboardEnabledState(int $value) : void {
|
||||||
|
$config = $this->GetConfig();
|
||||||
|
$config['isWhiteboardEnabled'] = $value;
|
||||||
|
$this->WriteConfig($config);
|
||||||
|
}
|
||||||
|
|
||||||
public function SetClamavEnabledState(int $value) : void {
|
public function SetClamavEnabledState(int $value) : void {
|
||||||
$config = $this->GetConfig();
|
$config = $this->GetConfig();
|
||||||
$config['isClamavEnabled'] = $value;
|
$config['isClamavEnabled'] = $value;
|
||||||
|
|
|
||||||
|
|
@ -417,6 +417,12 @@ class DockerActionManager
|
||||||
if (in_array('caddy', $communityContainers, true)) {
|
if (in_array('caddy', $communityContainers, true)) {
|
||||||
$replacements[1] = gethostbyname('nextcloud-aio-caddy');
|
$replacements[1] = gethostbyname('nextcloud-aio-caddy');
|
||||||
}
|
}
|
||||||
|
} elseif ($out[1] === 'WHITEBOARD_ENABLED') {
|
||||||
|
if ($this->configurationManager->isWhiteboardEnabled()) {
|
||||||
|
$replacements[1] = 'yes';
|
||||||
|
} else {
|
||||||
|
$replacements[1] = '';
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$secret = $this->configurationManager->GetSecret($out[1]);
|
$secret = $this->configurationManager->GetSecret($out[1]);
|
||||||
if ($secret === "") {
|
if ($secret === "") {
|
||||||
|
|
|
||||||
|
|
@ -597,6 +597,11 @@
|
||||||
{% else %}
|
{% else %}
|
||||||
<p><input type="checkbox" id="docker-socket-proxy" name="docker-socket-proxy"><label for="docker-socket-proxy">Docker Socket Proxy (needed for <a href="https://github.com/cloud-py-api/app_api#nextcloud-appapi">Nextcloud App API</a>)</label></p>
|
<p><input type="checkbox" id="docker-socket-proxy" name="docker-socket-proxy"><label for="docker-socket-proxy">Docker Socket Proxy (needed for <a href="https://github.com/cloud-py-api/app_api#nextcloud-appapi">Nextcloud App API</a>)</label></p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if is_whiteboard_enabled == true %}
|
||||||
|
<p><input type="checkbox" id="whiteboard" name="whiteboard" checked="checked"><label for="whiteboard">Whiteboard</label></p>
|
||||||
|
{% else %}
|
||||||
|
<p><input type="checkbox" id="whiteboard" name="whiteboard"><label for="whiteboard">Whiteboard</label></p>
|
||||||
|
{% endif %}
|
||||||
<input id="options-form-submit" type="submit" value="Save changes" />
|
<input id="options-form-submit" type="submit" value="Save changes" />
|
||||||
<script type="text/javascript" src="options-form-submit.js"></script>
|
<script type="text/javascript" src="options-form-submit.js"></script>
|
||||||
</form>
|
</form>
|
||||||
|
|
@ -612,6 +617,7 @@
|
||||||
<script type="text/javascript" src="disable-imaginary.js"></script>
|
<script type="text/javascript" src="disable-imaginary.js"></script>
|
||||||
<script type="text/javascript" src="disable-fulltextsearch.js"></script>
|
<script type="text/javascript" src="disable-fulltextsearch.js"></script>
|
||||||
<script type="text/javascript" src="disable-talk-recording.js"></script>
|
<script type="text/javascript" src="disable-talk-recording.js"></script>
|
||||||
|
<script type="text/javascript" src="disable-whiteboard.js"></script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if is_collabora_enabled == true and isAnyRunning == false and was_start_button_clicked == true %}
|
{% if is_collabora_enabled == true and isAnyRunning == false and was_start_button_clicked == true %}
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,8 @@ Included are:
|
||||||
- Imaginary (optional, for previews of heic, heif, illustrator, pdf, svg, tiff and webp)
|
- Imaginary (optional, for previews of heic, heif, illustrator, pdf, svg, tiff and webp)
|
||||||
- ClamAV (optional, Antivirus backend for Nextcloud)
|
- ClamAV (optional, Antivirus backend for Nextcloud)
|
||||||
- Fulltextsearch (optional)
|
- Fulltextsearch (optional)
|
||||||
|
- Whiteboard (optional)
|
||||||
|
- Docker Socket Proxy (optional, needed for [Nextcloud App API](https://github.com/cloud-py-api/app_api#nextcloud-appapi))
|
||||||
<details><summary>And much more:</summary>
|
<details><summary>And much more:</summary>
|
||||||
|
|
||||||
- Simple web interface included that enables easy installation and maintenance
|
- Simple web interface included that enables easy installation and maintenance
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue