public
nobgit
read
NobMail
Based on mailcow: dockerized
Languages
Repository composition by tracked source files.
PHP
49%
JavaScript
35%
HTML
9%
CSS
4%
Shell
2%
Python
1%
Lua
0%
Perl
0%
Ruby
0%
SCSS
0%
Create file
Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git
Commit
fix: show stopped and failed containers in dashboard and API
99dc0f66
data/Dockerfiles/dockerapi/main.py | 4 ++--
data/web/inc/functions.docker.inc.php | 2 +-
docker-compose.yml | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
Diff
diff --git a/data/Dockerfiles/dockerapi/main.py b/data/Dockerfiles/dockerapi/main.py
index 57e26286..bf197bd6 100644
--- a/data/Dockerfiles/dockerapi/main.py
+++ b/data/Dockerfiles/dockerapi/main.py
@@ -110,12 +110,12 @@ async def get_container(container_id : str):
return Response(content=json.dumps(res, indent=4), media_type="application/json")
@app.get("/containers/json")
-async def get_containers():
+async def get_containers(all: bool = False):
global dockerapi
containers = {}
try:
- for container in (await dockerapi.async_docker_client.containers.list()):
+ for container in (await dockerapi.async_docker_client.containers.list(all=all)):
container_info = await container.show()
containers.update({container_info['Id']: container_info})
return Response(content=json.dumps(containers, indent=4), media_type="application/json")
diff --git a/data/web/inc/functions.docker.inc.php b/data/web/inc/functions.docker.inc.php
index 5b5b7ace..daed17c6 100644
--- a/data/web/inc/functions.docker.inc.php
+++ b/data/web/inc/functions.docker.inc.php
@@ -63,7 +63,7 @@ function docker($action, $service_name = null, $attr1 = null, $attr2 = null, $ex
break;
case 'info':
if (empty($service_name)) {
- curl_setopt($curl, CURLOPT_URL, 'https://dockerapi:443/containers/json');
+ curl_setopt($curl, CURLOPT_URL, 'https://dockerapi:443/containers/json?all=true');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_POST, 0);
curl_setopt($curl, CURLOPT_TIMEOUT, $DOCKER_TIMEOUT);
diff --git a/docker-compose.yml b/docker-compose.yml
index 75cca872..88a083b2 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -597,7 +597,7 @@ services:
- watchdog
dockerapi-mailcow:
- image: ghcr.io/mailcow/dockerapi:2.11
+ image: ghcr.io/mailcow/dockerapi:2.11a
security_opt:
- label=disable
restart: always