mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-05-21 10:50:10 +00:00
Compare commits
6 Commits
automated/
...
copilot/ad
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
46949e85a7 | ||
|
|
47a6fd2c0e | ||
|
|
374695baae | ||
|
|
1d9198b8f2 | ||
|
|
b0842bf7ea | ||
|
|
975d32962b |
@@ -207,7 +207,12 @@
|
||||
"pattern": "^/[a-z/_0-9-:]+$"
|
||||
}
|
||||
},
|
||||
"volumes": {
|
||||
"oom_score_adj": {
|
||||
"type": "integer",
|
||||
"minimum": -1000,
|
||||
"maximum": 1000
|
||||
},
|
||||
"volumes": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
|
||||
@@ -81,7 +81,8 @@
|
||||
],
|
||||
"cap_drop": [
|
||||
"NET_RAW"
|
||||
]
|
||||
],
|
||||
"oom_score_adj": -100
|
||||
},
|
||||
{
|
||||
"container_name": "nextcloud-aio-database",
|
||||
@@ -138,7 +139,8 @@
|
||||
],
|
||||
"cap_drop": [
|
||||
"NET_RAW"
|
||||
]
|
||||
],
|
||||
"oom_score_adj": -300
|
||||
},
|
||||
{
|
||||
"container_name": "nextcloud-aio-nextcloud",
|
||||
@@ -280,7 +282,8 @@
|
||||
],
|
||||
"cap_drop": [
|
||||
"NET_RAW"
|
||||
]
|
||||
],
|
||||
"oom_score_adj": -100
|
||||
},
|
||||
{
|
||||
"container_name": "nextcloud-aio-notify-push",
|
||||
@@ -321,7 +324,8 @@
|
||||
"read_only": true,
|
||||
"cap_drop": [
|
||||
"NET_RAW"
|
||||
]
|
||||
],
|
||||
"oom_score_adj": 100
|
||||
},
|
||||
{
|
||||
"container_name": "nextcloud-aio-redis",
|
||||
@@ -363,7 +367,8 @@
|
||||
"read_only": true,
|
||||
"cap_drop": [
|
||||
"NET_RAW"
|
||||
]
|
||||
],
|
||||
"oom_score_adj": -300
|
||||
},
|
||||
{
|
||||
"container_name": "nextcloud-aio-collabora",
|
||||
@@ -413,7 +418,8 @@
|
||||
],
|
||||
"cap_drop": [
|
||||
"NET_RAW"
|
||||
]
|
||||
],
|
||||
"oom_score_adj": 300
|
||||
},
|
||||
{
|
||||
"container_name": "nextcloud-aio-talk",
|
||||
@@ -484,7 +490,8 @@
|
||||
],
|
||||
"cap_drop": [
|
||||
"NET_RAW"
|
||||
]
|
||||
],
|
||||
"oom_score_adj": 300
|
||||
},
|
||||
{
|
||||
"container_name": "nextcloud-aio-talk-recording",
|
||||
@@ -538,7 +545,8 @@
|
||||
],
|
||||
"cap_drop": [
|
||||
"NET_RAW"
|
||||
]
|
||||
],
|
||||
"oom_score_adj": 300
|
||||
},
|
||||
{
|
||||
"container_name": "nextcloud-aio-borgbackup",
|
||||
@@ -609,7 +617,8 @@
|
||||
"tmpfs": [
|
||||
"/tmp",
|
||||
"/nextcloud_aio_volumes"
|
||||
]
|
||||
],
|
||||
"oom_score_adj": -300
|
||||
},
|
||||
{
|
||||
"container_name": "nextcloud-aio-watchtower",
|
||||
@@ -632,7 +641,8 @@
|
||||
"read_only": true,
|
||||
"cap_drop": [
|
||||
"NET_RAW"
|
||||
]
|
||||
],
|
||||
"oom_score_adj": -300
|
||||
},
|
||||
{
|
||||
"container_name": "nextcloud-aio-domaincheck",
|
||||
@@ -665,7 +675,8 @@
|
||||
],
|
||||
"cap_drop": [
|
||||
"NET_RAW"
|
||||
]
|
||||
],
|
||||
"oom_score_adj": 300
|
||||
},
|
||||
{
|
||||
"container_name": "nextcloud-aio-clamav",
|
||||
@@ -712,7 +723,8 @@
|
||||
],
|
||||
"cap_drop": [
|
||||
"NET_RAW"
|
||||
]
|
||||
],
|
||||
"oom_score_adj": 300
|
||||
},
|
||||
{
|
||||
"container_name": "nextcloud-aio-onlyoffice",
|
||||
@@ -756,7 +768,8 @@
|
||||
],
|
||||
"cap_drop": [
|
||||
"NET_RAW"
|
||||
]
|
||||
],
|
||||
"oom_score_adj": 300
|
||||
},
|
||||
{
|
||||
"container_name": "nextcloud-aio-imaginary",
|
||||
@@ -798,7 +811,8 @@
|
||||
],
|
||||
"secrets": [
|
||||
"IMAGINARY_SECRET"
|
||||
]
|
||||
],
|
||||
"oom_score_adj": 300
|
||||
},
|
||||
{
|
||||
"container_name": "nextcloud-aio-fulltextsearch",
|
||||
@@ -850,7 +864,8 @@
|
||||
],
|
||||
"cap_drop": [
|
||||
"NET_RAW"
|
||||
]
|
||||
],
|
||||
"oom_score_adj": 300
|
||||
},
|
||||
{
|
||||
"container_name": "nextcloud-aio-docker-socket-proxy",
|
||||
@@ -877,7 +892,8 @@
|
||||
],
|
||||
"cap_drop": [
|
||||
"NET_RAW"
|
||||
]
|
||||
],
|
||||
"oom_score_adj": 100
|
||||
},
|
||||
{
|
||||
"container_name": "nextcloud-aio-harp",
|
||||
@@ -918,7 +934,8 @@
|
||||
],
|
||||
"cap_drop": [
|
||||
"NET_RAW"
|
||||
]
|
||||
],
|
||||
"oom_score_adj": 100
|
||||
},
|
||||
{
|
||||
"container_name": "nextcloud-aio-whiteboard",
|
||||
@@ -964,7 +981,8 @@
|
||||
"read_only": true,
|
||||
"cap_drop": [
|
||||
"NET_RAW"
|
||||
]
|
||||
],
|
||||
"oom_score_adj": 300
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ readonly class Container {
|
||||
public AioVariables $aioVariables,
|
||||
public string $documentation,
|
||||
public bool $hideFromList,
|
||||
public int $oomScoreAdj,
|
||||
private DockerActionManager $dockerActionManager
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -345,6 +345,11 @@ readonly class ContainerDefinitionFetcher {
|
||||
|
||||
$hideFromList = $entry['hide_from_list'] ?? false;
|
||||
|
||||
$oomScoreAdj = 500;
|
||||
if (isset($entry['oom_score_adj'])) {
|
||||
$oomScoreAdj = $entry['oom_score_adj'];
|
||||
}
|
||||
|
||||
$containers[] = new Container(
|
||||
$entry['container_name'],
|
||||
$displayName,
|
||||
@@ -371,6 +376,7 @@ readonly class ContainerDefinitionFetcher {
|
||||
$aioVariables,
|
||||
$documentation,
|
||||
$hideFromList,
|
||||
$oomScoreAdj,
|
||||
$this->container->get(DockerActionManager::class)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -394,6 +394,10 @@ readonly class DockerActionManager {
|
||||
$requestBody['StopTimeout'] = $maxShutDownTime;
|
||||
}
|
||||
|
||||
if ($container->oomScoreAdj !== 0) {
|
||||
$requestBody['HostConfig']['OomScoreAdj'] = $container->oomScoreAdj;
|
||||
}
|
||||
|
||||
$capAdds = $container->capAdd;
|
||||
if (count($capAdds) > 0) {
|
||||
$requestBody['HostConfig']['CapAdd'] = $capAdds;
|
||||
|
||||
Reference in New Issue
Block a user