Skip to content

Commit

Permalink
Repo-sync
Browse files Browse the repository at this point in the history
  • Loading branch information
GitHub Workflow committed Dec 20, 2024
1 parent 2e301a8 commit f6db9a8
Show file tree
Hide file tree
Showing 27 changed files with 196 additions and 67 deletions.
5 changes: 2 additions & 3 deletions Containers/collabora/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:latest
# From a file located probably somewhere here: https://github.com/CollaboraOnline/online/tree/master/docker
FROM collabora/code:24.04.10.2.1
FROM collabora/code:24.04.9.1.1

USER root
ARG DEBIAN_FRONTEND=noninteractive
Expand All @@ -10,8 +10,7 @@ RUN set -ex; \
\
apt-get update; \
apt-get install -y --no-install-recommends \
# # Disable because seems to be failing currently
# # tzdata \
tzdata \
netcat-openbsd \
; \
rm -rf /var/lib/apt/lists/*;
Expand Down
2 changes: 1 addition & 1 deletion Containers/fulltextsearch/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:latest
# Probably from here https://github.com/elastic/elasticsearch/blob/main/distribution/docker/src/docker/Dockerfile
FROM elasticsearch:8.16.1
FROM elasticsearch:8.17.0

USER root

Expand Down
2 changes: 1 addition & 1 deletion Containers/mastercontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:latest
# Docker CLI is a requirement
FROM docker:27.4.0-cli AS docker
FROM docker:27.4.1-cli AS docker

# Caddy is a requirement
FROM caddy:2.8.4-alpine AS caddy
Expand Down
7 changes: 5 additions & 2 deletions Containers/nextcloud/run-exec-commands.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
#!/bin/bash

# Wait 15s for domain to be reachable
sleep 15
# Wait until the apache container is ready
while ! nc -z "$APACHE_HOST" "$APACHE_PORT"; do
echo "Waiting for Apache to become available..."
sleep 15
done

if [ -n "$NEXTCLOUD_EXEC_COMMANDS" ]; then
echo "#!/bin/bash" > /tmp/nextcloud-exec-commands
Expand Down
2 changes: 1 addition & 1 deletion Containers/talk/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:latest
FROM nats:2.10.23-scratch AS nats
FROM nats:2.10.24-scratch AS nats
FROM eturnal/eturnal:1.12.1 AS eturnal
FROM strukturag/nextcloud-spreed-signaling:2.0.1 AS signaling
FROM alpine:3.21.0 AS janus
Expand Down
4 changes: 4 additions & 0 deletions community-containers/facerecognition/facerecognition.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
"aio_variables": [
"nextcloud_memory_limit=2048M"
],
"devices": [
"/dev/dri"
],
"enable_nvidia_gpu": true,
"nextcloud_exec_commands": [
"php /var/www/html/occ app:install facerecognition",
"php /var/www/html/occ app:enable facerecognition",
Expand Down
1 change: 1 addition & 0 deletions community-containers/jellyfin/jellyfin.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"devices": [
"/dev/dri"
],
"enable_nvidia_gpu": true,
"backup_volumes": [
"nextcloud_aio_jellyfin"
]
Expand Down
4 changes: 4 additions & 0 deletions community-containers/local-ai/local-ai.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
"writeable": false
}
],
"devices": [
"/dev/dri"
],
"enable_nvidia_gpu": true,
"nextcloud_exec_commands": [
"mkdir '/mnt/ncdata/admin/files/nextcloud-aio-local-ai'",
"touch '/mnt/ncdata/admin/files/nextcloud-aio-local-ai/models.yaml'",
Expand Down
1 change: 1 addition & 0 deletions community-containers/memories/memories.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"devices": [
"/dev/dri"
],
"enable_nvidia_gpu": true,
"nextcloud_exec_commands": [
"php /var/www/html/occ app:install memories",
"php /var/www/html/occ app:enable memories",
Expand Down
2 changes: 1 addition & 1 deletion community-containers/memories/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
This container bundles the hardware-transcoding container of memories and auto-configures it for you.

### Notes
- In order to actually enable the hardware transcoding, you need to add the following flag to AIO apart from adding this container: https://github.com/nextcloud/all-in-one#how-to-enable-hardware-transcoding-for-nextcloud
- In order to actually enable the hardware transcoding, you need to add the following flag to AIO apart from adding this container: https://github.com/nextcloud/all-in-one#how-to-enable-hardware-acceleration-for-nextcloud
- See https://github.com/nextcloud/all-in-one/tree/main/community-containers#community-containers how to add it to the AIO stack

### Repository
Expand Down
1 change: 1 addition & 0 deletions community-containers/plex/plex.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"devices": [
"/dev/dri"
],
"enable_nvidia_gpu": true,
"backup_volumes": [
"nextcloud_aio_plex"
]
Expand Down
3 changes: 2 additions & 1 deletion compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ services:
# NEXTCLOUD_STARTUP_APPS: deck twofactor_totp tasks calendar contacts notes # Allows to modify the Nextcloud apps that are installed on starting AIO the first time. See https://github.com/nextcloud/all-in-one#how-to-change-the-nextcloud-apps-that-are-installed-on-the-first-startup
# NEXTCLOUD_ADDITIONAL_APKS: imagemagick # This allows to add additional packages to the Nextcloud container permanently. Default is imagemagick but can be overwritten by modifying this value. See https://github.com/nextcloud/all-in-one#how-to-add-os-packages-permanently-to-the-nextcloud-container
# NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS: imagick # This allows to add additional php extensions to the Nextcloud container permanently. Default is imagick but can be overwritten by modifying this value. See https://github.com/nextcloud/all-in-one#how-to-add-php-extensions-permanently-to-the-nextcloud-container
# NEXTCLOUD_ENABLE_DRI_DEVICE: true # This allows to enable the /dev/dri device in the Nextcloud container. ⚠️⚠️⚠️ Warning: this only works if the '/dev/dri' device is present on the host! If it should not exist on your host, don't set this to true as otherwise the Nextcloud container will fail to start! See https://github.com/nextcloud/all-in-one#how-to-enable-hardware-transcoding-for-nextcloud
# NEXTCLOUD_ENABLE_DRI_DEVICE: true # This allows to enable the /dev/dri device in the Nextcloud container. ⚠️⚠️⚠️ Warning: this only works if the '/dev/dri' device is present on the host! If it should not exist on your host, don't set this to true as otherwise the Nextcloud container will fail to start! See https://github.com/nextcloud/all-in-one#how-to-enable-hardware-acceleration-for-nextcloud
# ENABLE_NVIDIA_GPU: true # This allows to enable the NVIDIA runtime and GPU access for containers that profit from it. ⚠️⚠️⚠️ Warning: this only works if an NVIDIA gpu is installed on the server. See https://github.com/nextcloud/all-in-one#how-to-enable-hardware-acceleration-for-nextcloud.
# NEXTCLOUD_KEEP_DISABLED_APPS: false # Setting this to true will keep Nextcloud apps that are disabled in the AIO interface and not uninstall them if they should be installed. See https://github.com/nextcloud/all-in-one#how-to-keep-disabled-apps
# SKIP_DOMAIN_VALIDATION: false # This should only be set to true if things are correctly configured. See https://github.com/nextcloud/all-in-one?tab=readme-ov-file#how-to-skip-the-domain-validation
# TALK_PORT: 3478 # This allows to adjust the port that the talk container is using. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-talk-port
Expand Down
3 changes: 2 additions & 1 deletion manual-install/latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ services:
- POSTGRES_USER=nextcloud
- REDIS_HOST=nextcloud-aio-redis
- REDIS_HOST_PASSWORD=${REDIS_PASSWORD}
- APACHE_HOST=nextcloud-aio-apache
- APACHE_PORT
- NC_DOMAIN
- ADMIN_USER=admin
- ADMIN_PASSWORD=${NEXTCLOUD_PASSWORD}
Expand Down Expand Up @@ -174,7 +176,6 @@ services:
- TALK_RECORDING_HOST=nextcloud-aio-talk-recording
- FULLTEXTSEARCH_PASSWORD
- REMOVE_DISABLED_APPS
- APACHE_PORT
- IMAGINARY_SECRET
- WHITEBOARD_SECRET
- WHITEBOARD_ENABLED
Expand Down
1 change: 1 addition & 0 deletions manual-install/update-yaml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ OUTPUT="$(cat /tmp/containers.json)"
OUTPUT="$(echo "$OUTPUT" | jq 'del(.services[].internal_port)')"
OUTPUT="$(echo "$OUTPUT" | jq 'del(.services[].secrets)')"
OUTPUT="$(echo "$OUTPUT" | jq 'del(.services[].devices)')"
OUTPUT="$(echo "$OUTPUT" | jq 'del(.services[].enable_nvidia_gpu)')"
OUTPUT="$(echo "$OUTPUT" | jq 'del(.services[].backup_volumes)')"
OUTPUT="$(echo "$OUTPUT" | jq 'del(.services[].nextcloud_exec_commands)')"
OUTPUT="$(echo "$OUTPUT" | jq 'del(.services[].image_tag)')"
Expand Down
3 changes: 3 additions & 0 deletions php/containers-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@
"pattern": "^/dev/[a-z]+$"
}
},
"enable_nvidia_gpu": {
"type": "boolean"
},
"apparmor_unconfined": {
"type": "boolean"
},
Expand Down
8 changes: 7 additions & 1 deletion php/containers.json
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@
"POSTGRES_USER=nextcloud",
"REDIS_HOST=nextcloud-aio-redis",
"REDIS_HOST_PASSWORD=%REDIS_PASSWORD%",
"APACHE_HOST=nextcloud-aio-apache",
"APACHE_PORT=%APACHE_PORT%",
"AIO_TOKEN=%AIO_TOKEN%",
"NC_DOMAIN=%NC_DOMAIN%",
"ADMIN_USER=admin",
Expand Down Expand Up @@ -251,7 +253,6 @@
"FULLTEXTSEARCH_PASSWORD=%FULLTEXTSEARCH_PASSWORD%",
"DOCKER_SOCKET_PROXY_ENABLED=%DOCKER_SOCKET_PROXY_ENABLED%",
"REMOVE_DISABLED_APPS=%REMOVE_DISABLED_APPS%",
"APACHE_PORT=%APACHE_PORT%",
"ADDITIONAL_TRUSTED_PROXY=%CADDY_IP_ADDRESS%",
"THIS_IS_AIO=true",
"IMAGINARY_SECRET=%IMAGINARY_SECRET%",
Expand All @@ -263,6 +264,7 @@
"devices": [
"/dev/dri"
],
"enable_nvidia_gpu": true,
"backup_volumes": [
"nextcloud_aio_nextcloud"
],
Expand Down Expand Up @@ -520,6 +522,10 @@
"profiles": [
"talk-recording"
],
"devices": [
"/dev/dri"
],
"enable_nvidia_gpu": true,
"networks": [
"nextcloud-aio"
],
Expand Down
1 change: 1 addition & 0 deletions php/public/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@
'nextcloud_max_time' => $configurationManager->GetNextcloudMaxTime(),
'nextcloud_memory_limit' => $configurationManager->GetNextcloudMemoryLimit(),
'is_dri_device_enabled' => $configurationManager->isDriDeviceEnabled(),
'is_nvidia_gpu_enabled' => $configurationManager->isNvidiaGpuEnabled(),
'is_talk_recording_enabled' => $configurationManager->isTalkRecordingEnabled(),
'is_docker_socket_proxy_enabled' => $configurationManager->isDockerSocketProxyEnabled(),
'is_whiteboard_enabled' => $configurationManager->isWhiteboardEnabled(),
Expand Down
62 changes: 48 additions & 14 deletions php/public/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@
--color-error-text: #c20505;
--color-success: #46ba61;
--color-running: #ffd000;
--color-info: #0071ad;
--color-info-hover: #00aaef;
--color-primary-element: #00679e;
--color-primary-element-hover: #005a8a;
--color-primary-element-text: #ffffff;
--color-primary-element-light: #e5eff5;
--color-primary-element-light-hover: #dbe4ea;
--color-primary-element-light-text: #00293f;
--color-border-maxcontrast: #7d7d7d;
--color-loader: #f3f3f3;
--color-disabled: #d3d3d3; /* light gray background for disabled checkboxes */
Expand Down Expand Up @@ -52,8 +56,12 @@ Note: Unfortunately, it's not possible to calculate this dynamically using CSS v
--color-error: #ff3333;
--color-error-hover: #ff6666;
--color-error-text: #ff8080;
--color-info: #00aeff;
--color-info-hover: #33beff;
--color-primary-element:#0091f2;
--color-primary-element-hover:#079cff;
--color-primary-element-text:#000000;
--color-primary-element-light:#14232c;
--color-primary-element-light-hover:#1e2d35;
--color-primary-element-light-text:#99d3f9;
--color-loader: var(--color-border-maxcontrast);
--border-hover: var(--border);
}
Expand All @@ -68,11 +76,11 @@ html, body {

a {
text-decoration: none;
color: var(--color-info);
color: var(--color-primary-element);
}

a:hover {
color: var(--color-info-hover);
color: var(--color-primary-element-hover);
}

a.button,
Expand All @@ -81,26 +89,52 @@ input[type="submit"] {
width: auto;
height: 34px;
cursor: pointer;
background-color: var(--color-nextcloud-blue);
background-color: var(--color-primary-element);
font-weight: bold;
border-radius: var(--border-radius);
margin: 3px 3px 3px 0;
font-size: var(--default-font-size);
color: white;
border: .5px solid var(--color-main-border);
color: var(--color-primary-element-text);
border: none;
outline: none;
}

a.button:focus,
input[type="submit"]:focus {
border: 1px solid var(--color-main-border);
outline: 2px solid var(--color-main-border);
}

a.button:hover,
input[type="submit"]:hover {
background-color: var(--color-info-hover);
background-color: var(--color-primary-element-hover);
}


a.button.light:hover,
input[type="submit"].light:hover {
background-color: var(--color-primary-element-light);
color: var(--color-primary-element-light-text);
}


a.button.light,
input[type="submit"].light {
background-color: var(--color-primary-element-light);
}

a.button.error,
input[type="submit"].error {
background-color: var(--color-error);
}

a.button.error:hover,
input[type="submit"].error:hover {
background-color: var(--color-error-hover);
}




summary {
cursor: pointer;
}
Expand Down Expand Up @@ -352,7 +386,7 @@ input[type="checkbox"]:not(:disabled) {
-webkit-appearance: none; /* remove default styling */
-moz-appearance: none;
appearance: none;
border: 1px solid var(--color-nextcloud-blue);
border: 1px solid var(--color-primary-element);
border-radius: 2px;
cursor: pointer;
position: relative;
Expand All @@ -362,12 +396,12 @@ input[type="checkbox"]:not(:disabled) {

/* Hover effects for enabled checkboxes */
input[type="checkbox"]:not(:disabled):hover {
border-color: var(--color-info-hover);
border-color: var(--color-primary-element-hover);
}

/* Checkmark styling for enabled checkboxes */
input[type="checkbox"]:checked:not(:disabled) {
background-color: var(--color-nextcloud-blue);
background-color: var(--color-primary-element);
border-color: var(--color-border-maxcontrast);
}

Expand Down
5 changes: 5 additions & 0 deletions php/src/Container/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public function __construct(
private array $secrets,
/** @var string[] */
private array $devices,
private bool $enable_nvidia_gpu,
/** @var string[] */
private array $capAdd,
private int $shmSize,
Expand Down Expand Up @@ -92,6 +93,10 @@ public function GetDevices() : array {
return $this->devices;
}

public function isNvidiaGpuEnabled() : bool {
return $this->enable_nvidia_gpu;
}

public function GetCapAdds() : array {
return $this->capAdd;
}
Expand Down
6 changes: 6 additions & 0 deletions php/src/ContainerDefinitionFetcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,11 @@ private function GetDefinition(): array
$devices = $entry['devices'];
}

$enableNvidiaGpu = false;
if (is_bool($entry['enable_nvidia_gpu'])) {
$enableNvidiaGpu = $entry['enable_nvidia_gpu'];
}

$capAdd = [];
if (isset($entry['cap_add'])) {
$capAdd = $entry['cap_add'];
Expand Down Expand Up @@ -312,6 +317,7 @@ private function GetDefinition(): array
$dependsOn,
$secrets,
$devices,
$enableNvidiaGpu,
$capAdd,
$shmSize,
$apparmorUnconfined,
Expand Down
16 changes: 16 additions & 0 deletions php/src/Data/ConfigurationManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,11 @@ public function isFulltextsearchEnabled() : bool {
}

public function SetFulltextsearchEnabledState(int $value) : void {
# Elasticsearch does not work on kernels without seccomp anymore. See https://github.com/nextcloud/all-in-one/discussions/5768
if ($this->GetCollaboraSeccompDisabledState() === 'true') {
$value = 0;
}

$config = $this->GetConfig();
$config['isFulltextsearchEnabled'] = $value;
$this->WriteConfig($config);
Expand Down Expand Up @@ -983,6 +988,17 @@ public function isDriDeviceEnabled() : bool {
}
}

private function GetEnabledNvidiaGpu() : string {
$envVariableName = 'ENABLE_NVIDIA_GPU';
$configName = 'enable_nvidia_gpu';
$defaultValue = '';
return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue);
}

public function isNvidiaGpuEnabled() : bool {
return $this->GetEnabledNvidiaGpu() === 'true';
}

private function GetKeepDisabledApps() : string {
$envVariableName = 'NEXTCLOUD_KEEP_DISABLED_APPS';
$configName = 'nextcloud_keep_disabled_apps';
Expand Down
Loading

0 comments on commit f6db9a8

Please sign in to comment.