mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-19 22:16:49 +00:00
add imaginary
Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
parent
c926f92b6f
commit
05e90d6110
13 changed files with 95 additions and 2 deletions
9
.github/dependabot.yml
vendored
9
.github/dependabot.yml
vendored
|
|
@ -135,3 +135,12 @@ updates:
|
||||||
labels:
|
labels:
|
||||||
- 3. to review
|
- 3. to review
|
||||||
- dependencies
|
- dependencies
|
||||||
|
- package-ecosystem: "docker"
|
||||||
|
directory: "/Containers/imaginary"
|
||||||
|
schedule:
|
||||||
|
interval: "daily"
|
||||||
|
time: "12:00"
|
||||||
|
open-pull-requests-limit: 10
|
||||||
|
labels:
|
||||||
|
- 3. to review
|
||||||
|
- dependencies
|
||||||
|
|
|
||||||
2
Containers/imaginary/Dockerfile
Normal file
2
Containers/imaginary/Dockerfile
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
# From https://github.com/h2non/imaginary/blob/master/Dockerfile
|
||||||
|
FROM nextcloud/imaginary:20220819
|
||||||
|
|
@ -407,5 +407,16 @@ else
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Imaginary
|
||||||
|
if version_greater "24.0.0.0" "$installed_version"; then
|
||||||
|
if [ "$IMAGINARY_ENABLED" = 'yes' ]; then
|
||||||
|
php /var/www/html/occ config:system:set enabledPreviewProviders 0 --value="OC\\Preview\\Imaginary"
|
||||||
|
php /var/www/html/occ config:system:set preview_imaginary_url --value="http://$IMAGINARY_HOST:9000"
|
||||||
|
else
|
||||||
|
php /var/www/html/occ config:system:delete enabledPreviewProviders 0
|
||||||
|
php /var/www/html/occ config:system:delete preview_imaginary_url
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Remove the update skip file always
|
# Remove the update skip file always
|
||||||
rm -f /mnt/ncdata/skip.update
|
rm -f /mnt/ncdata/skip.update
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,8 @@
|
||||||
"identifier": "nextcloud-aio-nextcloud",
|
"identifier": "nextcloud-aio-nextcloud",
|
||||||
"dependsOn": [
|
"dependsOn": [
|
||||||
"nextcloud-aio-database",
|
"nextcloud-aio-database",
|
||||||
"nextcloud-aio-redis"
|
"nextcloud-aio-redis",
|
||||||
|
"nextcloud-aio-imaginary"
|
||||||
],
|
],
|
||||||
"displayName": "Nextcloud",
|
"displayName": "Nextcloud",
|
||||||
"containerName": "nextcloud/aio-nextcloud",
|
"containerName": "nextcloud/aio-nextcloud",
|
||||||
|
|
@ -140,7 +141,9 @@
|
||||||
"ONLYOFFICE_HOST=nextcloud-aio-onlyoffice",
|
"ONLYOFFICE_HOST=nextcloud-aio-onlyoffice",
|
||||||
"UPDATE_NEXTCLOUD_APPS=%UPDATE_NEXTCLOUD_APPS%",
|
"UPDATE_NEXTCLOUD_APPS=%UPDATE_NEXTCLOUD_APPS%",
|
||||||
"TZ=%TIMEZONE%",
|
"TZ=%TIMEZONE%",
|
||||||
"TALK_PORT=%TALK_PORT%"
|
"TALK_PORT=%TALK_PORT%",
|
||||||
|
"IMAGINARY_ENABLED=%IMAGINARY_ENABLED%",
|
||||||
|
"IMAGINARY_HOST=nextcloud-aio-imaginary"
|
||||||
],
|
],
|
||||||
"maxShutdownTime": 10,
|
"maxShutdownTime": 10,
|
||||||
"restartPolicy": "unless-stopped"
|
"restartPolicy": "unless-stopped"
|
||||||
|
|
@ -367,6 +370,23 @@
|
||||||
],
|
],
|
||||||
"maxShutdownTime": 10,
|
"maxShutdownTime": 10,
|
||||||
"restartPolicy": "unless-stopped"
|
"restartPolicy": "unless-stopped"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identifier": "nextcloud-aio-imaginary",
|
||||||
|
"dependsOn": [],
|
||||||
|
"displayName": "Imaginary",
|
||||||
|
"containerName": "nextcloud/aio-imaginary",
|
||||||
|
"ports": [],
|
||||||
|
"internalPorts": [
|
||||||
|
"9000"
|
||||||
|
],
|
||||||
|
"environmentVariables": [
|
||||||
|
"TZ=%TIMEZONE%"
|
||||||
|
],
|
||||||
|
"volumes": [],
|
||||||
|
"secrets": [],
|
||||||
|
"maxShutdownTime": 10,
|
||||||
|
"restartPolicy": "unless-stopped"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
5
php/public/disable-imaginary.js
Normal file
5
php/public/disable-imaginary.js
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
document.addEventListener("DOMContentLoaded", function(event) {
|
||||||
|
// Imaginary
|
||||||
|
var imaginary = document.getElementById("imaginary");
|
||||||
|
imaginary.disabled = true;
|
||||||
|
});
|
||||||
|
|
@ -102,6 +102,7 @@ $app->get('/containers', function ($request, $response, $args) use ($container)
|
||||||
'collabora_dictionaries' => $configurationManager->GetCollaboraDictionaries(),
|
'collabora_dictionaries' => $configurationManager->GetCollaboraDictionaries(),
|
||||||
'automatic_updates' => $configurationManager->areAutomaticUpdatesEnabled(),
|
'automatic_updates' => $configurationManager->areAutomaticUpdatesEnabled(),
|
||||||
'is_backup_section_enabled' => $configurationManager->isBackupSectionEnabled(),
|
'is_backup_section_enabled' => $configurationManager->isBackupSectionEnabled(),
|
||||||
|
'is_imaginary_enabled' => $configurationManager->isImaginaryEnabled(),
|
||||||
]);
|
]);
|
||||||
})->setName('profile');
|
})->setName('profile');
|
||||||
$app->get('/login', function ($request, $response, $args) use ($container) {
|
$app->get('/login', function ($request, $response, $args) use ($container) {
|
||||||
|
|
|
||||||
|
|
@ -23,4 +23,8 @@ document.addEventListener("DOMContentLoaded", function(event) {
|
||||||
// Talk
|
// Talk
|
||||||
var talk = document.getElementById("talk");
|
var talk = document.getElementById("talk");
|
||||||
talk.addEventListener('change', makeOptionsFormSubmitVisible);
|
talk.addEventListener('change', makeOptionsFormSubmitVisible);
|
||||||
|
|
||||||
|
// Imaginary
|
||||||
|
var imaginary = document.getElementById("imaginary");
|
||||||
|
imaginary.addEventListener('change', makeOptionsFormSubmitVisible);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,10 @@ class ContainerDefinitionFetcher
|
||||||
if (!$this->configurationManager->isTalkEnabled()) {
|
if (!$this->configurationManager->isTalkEnabled()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
} elseif ($entry['identifier'] === 'nextcloud-aio-imaginary') {
|
||||||
|
if (!$this->configurationManager->isImaginaryEnabled()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$ports = new ContainerPorts();
|
$ports = new ContainerPorts();
|
||||||
|
|
@ -146,6 +150,10 @@ class ContainerDefinitionFetcher
|
||||||
if (!$this->configurationManager->isTalkEnabled()) {
|
if (!$this->configurationManager->isTalkEnabled()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
} elseif ($value === 'nextcloud-aio-imaginary') {
|
||||||
|
if (!$this->configurationManager->isImaginaryEnabled()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$dependsOn[] = $value;
|
$dependsOn[] = $value;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -90,6 +90,11 @@ class ConfigurationController
|
||||||
} else {
|
} else {
|
||||||
$this->configurationManager->SetTalkEnabledState(0);
|
$this->configurationManager->SetTalkEnabledState(0);
|
||||||
}
|
}
|
||||||
|
if (isset($request->getParsedBody()['imaginary'])) {
|
||||||
|
$this->configurationManager->SetImaginaryEnabledState(1);
|
||||||
|
} else {
|
||||||
|
$this->configurationManager->SetImaginaryEnabledState(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($request->getParsedBody()['delete_collabora_dictionaries'])) {
|
if (isset($request->getParsedBody()['delete_collabora_dictionaries'])) {
|
||||||
|
|
|
||||||
|
|
@ -139,6 +139,21 @@ class ConfigurationManager
|
||||||
$this->WriteConfig($config);
|
$this->WriteConfig($config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function isImaginaryEnabled() : bool {
|
||||||
|
$config = $this->GetConfig();
|
||||||
|
if (isset($config['isImaginaryEnabled']) && $config['isImaginaryEnabled'] === 1) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function SetImaginaryEnabledState(int $value) : void {
|
||||||
|
$config = $this->GetConfig();
|
||||||
|
$config['isImaginaryEnabled'] = $value;
|
||||||
|
$this->WriteConfig($config);
|
||||||
|
}
|
||||||
|
|
||||||
public function isOnlyofficeEnabled() : bool {
|
public function isOnlyofficeEnabled() : bool {
|
||||||
$config = $this->GetConfig();
|
$config = $this->GetConfig();
|
||||||
if (isset($config['isOnlyofficeEnabled']) && $config['isOnlyofficeEnabled'] === 1) {
|
if (isset($config['isOnlyofficeEnabled']) && $config['isOnlyofficeEnabled'] === 1) {
|
||||||
|
|
|
||||||
|
|
@ -298,6 +298,12 @@ class DockerActionManager
|
||||||
} else {
|
} else {
|
||||||
$replacements[1] = $this->configurationManager->GetCollaboraDictionaries();
|
$replacements[1] = $this->configurationManager->GetCollaboraDictionaries();
|
||||||
}
|
}
|
||||||
|
} elseif ($out[1] === 'IMAGINARY_ENABLED') {
|
||||||
|
if ($this->configurationManager->isImaginaryEnabled()) {
|
||||||
|
$replacements[1] = 'yes';
|
||||||
|
} else {
|
||||||
|
$replacements[1] = '';
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$replacements[1] = $this->configurationManager->GetSecret($out[1]);
|
$replacements[1] = $this->configurationManager->GetSecret($out[1]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -452,6 +452,11 @@
|
||||||
{% else %}
|
{% else %}
|
||||||
<input type="checkbox" id="collabora" name="collabora"><label for="collabora">Collabora (Nextcloud Office)</label><br>
|
<input type="checkbox" id="collabora" name="collabora"><label for="collabora">Collabora (Nextcloud Office)</label><br>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if is_imaginary_enabled == true %}
|
||||||
|
<input type="checkbox" id="imaginary" name="imaginary" checked="checked"><label for="imaginary">Imaginary</label><br>
|
||||||
|
{% else %}
|
||||||
|
<input type="checkbox" id="imaginary" name="imaginary"><label for="imaginary">Imaginary</label><br>
|
||||||
|
{% endif %}
|
||||||
{% if is_talk_enabled == true %}
|
{% if is_talk_enabled == true %}
|
||||||
<input type="checkbox" id="talk" name="talk" checked="checked"><label for="talk">Nextcloud Talk (needs ports {{ talk_port }}/TCP and {{ talk_port }}/UDP open in your firewall/router)</label><br><br>
|
<input type="checkbox" id="talk" name="talk" checked="checked"><label for="talk">Nextcloud Talk (needs ports {{ talk_port }}/TCP and {{ talk_port }}/UDP open in your firewall/router)</label><br><br>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
@ -472,6 +477,7 @@
|
||||||
{% if isAnyRunning == true %}
|
{% if isAnyRunning == true %}
|
||||||
<script type="text/javascript" src="disable-talk.js"></script>
|
<script type="text/javascript" src="disable-talk.js"></script>
|
||||||
<script type="text/javascript" src="disable-collabora.js"></script>
|
<script type="text/javascript" src="disable-collabora.js"></script>
|
||||||
|
<script type="text/javascript" src="disable-imaginary.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 %}
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ Included are:
|
||||||
- High performance backend for Nextcloud Files
|
- High performance backend for Nextcloud Files
|
||||||
- High performance backend for Nextcloud Talk
|
- High performance backend for Nextcloud Talk
|
||||||
- Backup solution (based on [BorgBackup](https://github.com/borgbackup/borg#what-is-borgbackup))
|
- Backup solution (based on [BorgBackup](https://github.com/borgbackup/borg#what-is-borgbackup))
|
||||||
|
- Imaginary
|
||||||
- ClamAV
|
- ClamAV
|
||||||
|
|
||||||
## How to use this?
|
## How to use this?
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue