refactor(core): cleanly deprecate and remove portainer

Remove Portainer from the homelab control plane to strictly enforce
declarative GitOps and Infrastructure as Code boundaries. GUI-based
container mutation conflicts with automated webhook deployments and
the read-only Docker socket proxy invariant.

- Remove compose service and volume declarations
- Prune SOPS administrative secrets and NixOS module injection
- Remove from appctl discovery and Homepage dashboard compilation
- Purge from architecture and operational documentation
- Add negative Pytest invariant to prevent future reintroduction
This commit is contained in:
kiskaadee committed 2026-09-23 16:08:45 -05:00
1 parent 22d3a649ea
commit 2c8c7d969f
11 files changed
+27 -52

No files matched your search

+2 -3
View File
@@ -18,7 +18,7 @@ The homelab ecosystem separates **ownership**, **runtime architecture**, and **c
The system operates across four runtime layers: The system operates across four runtime layers:
1. **Host Foundation**: Headless NixOS Linux, disk configuration, Docker daemon, systemd daemons, firewall rules, and in-memory secret files under `/run/secrets/`. 1. **Host Foundation**: Headless NixOS Linux, disk configuration, Docker daemon, systemd daemons, firewall rules, and in-memory secret files under `/run/secrets/`.
2. **Edge Gateway**: Traefik (v3.6) reverse proxy terminating wildcard TLS (`*.roadtotech.me`) via Dynu DNS-01 Let's Encrypt validation. 2. **Edge Gateway**: Traefik (v3.6) reverse proxy terminating wildcard TLS (`*.roadtotech.me`) via Dynu DNS-01 Let's Encrypt validation.
3. **Core Platform Services**: Central services in `docker-compose.yml` (Authelia SSO, LLDAP directory, Stalwart mail, SnappyMail, Homepage dashboard, Portainer, Dozzle, Watchtower, Diun, and socket-proxy). 3. **Core Platform Services**: Central services in `docker-compose.yml` (Authelia SSO, LLDAP directory, Stalwart mail, SnappyMail, Homepage dashboard, Dozzle, Watchtower, Diun, and socket-proxy).
4. **Workload Plane**: Independent application stacks in `~/Sites` connected to the platform over the `proxy-net` Docker network. 4. **Workload Plane**: Independent application stacks in `~/Sites` connected to the platform over the `proxy-net` Docker network.
### 3. Cross-Cutting Orchestration ### 3. Cross-Cutting Orchestration
@@ -49,7 +49,7 @@ The system operates across four runtime layers:
│ Docker proxy-net │ │ Docker proxy-net │
├───────────────────────────────┤ ├───────────────────────────────┤
│ • Core Services (Homepage, │ │ • Core Services (Homepage, │
│ Portainer, Dozzle, etc.) │ │ Dozzle, etc.) │
│ • Workload Apps (~/Sites/*) │ │ • Workload Apps (~/Sites/*) │
└───────────────────────────────┘ └───────────────────────────────┘
│ │
@@ -74,7 +74,6 @@ The system operates across four runtime layers:
| **`stalwart`** | `mail.roadtotech.me` | Mail Server (SMTP/IMAP/JMAP/Sieve) | Native / LLDAP | | **`stalwart`** | `mail.roadtotech.me` | Mail Server (SMTP/IMAP/JMAP/Sieve) | Native / LLDAP |
| **`snappymail`** | `webmail.roadtotech.me` | Webmail client connected to Stalwart | Native / Stalwart | | **`snappymail`** | `webmail.roadtotech.me` | Webmail client connected to Stalwart | Native / Stalwart |
| **`homepage`** | `dashboard.roadtotech.me` | Service portal & system dashboard | Authelia Guard | | **`homepage`** | `dashboard.roadtotech.me` | Service portal & system dashboard | Authelia Guard |
| **`portainer`** | `portainer.roadtotech.me` | Container management GUI (via socket-proxy) | Authelia Guard |
| **`dozzle`** | `logs.roadtotech.me` | Container log viewer (via socket-proxy) | Authelia Guard | | **`dozzle`** | `logs.roadtotech.me` | Container log viewer (via socket-proxy) | Authelia Guard |
| **`watchtower`** | Internal | Automated container image updater | Internal Only | | **`watchtower`** | Internal | Automated container image updater | Internal Only |
| **`diun`** | Internal | Container image update notifier | Internal Only | | **`diun`** | Internal | Container image update notifier | Internal Only |
+1 -1
View File
@@ -10,7 +10,7 @@ This document outlines the security controls, container isolation rules, and ope
* Direct container mounts of `/var/run/docker.sock` are restricted. * Direct container mounts of `/var/run/docker.sock` are restricted.
* Only the dedicated `socket-proxy` container mounts `/var/run/docker.sock:ro`. * Only the dedicated `socket-proxy` container mounts `/var/run/docker.sock:ro`.
* State-modifying and execution API endpoints are disabled in HAProxy (`POST=0`, `DELETE=0`, `BUILD=0`, `EXEC=0`, `COMMIT=0`, `CONFIGS=0`, `DISTRIBUTION=0`, `NODES=0`, `PLUGINS=0`, `SECRETS=0`, `SWARM=0`, `SYSTEM=0`). * State-modifying and execution API endpoints are disabled in HAProxy (`POST=0`, `DELETE=0`, `BUILD=0`, `EXEC=0`, `COMMIT=0`, `CONFIGS=0`, `DISTRIBUTION=0`, `NODES=0`, `PLUGINS=0`, `SECRETS=0`, `SWARM=0`, `SYSTEM=0`).
* Traefik, Portainer, and Dozzle query Docker metrics and metadata via `tcp://socket-proxy:2375` rather than direct socket mounts. * Traefik and Dozzle query Docker metrics and metadata via `tcp://socket-proxy:2375` rather than direct socket mounts.
### B. Identity & Access Management (`lldap` & `authelia`) ### B. Identity & Access Management (`lldap` & `authelia`)
* **Directory Service**: User accounts and group memberships are stored in LLDAP (`users.roadtotech.me`). * **Directory Service**: User accounts and group memberships are stored in LLDAP (`users.roadtotech.me`).
-29
View File
@@ -161,34 +161,6 @@ services:
- "traefik.http.routers.authelia-red.entrypoints=web" - "traefik.http.routers.authelia-red.entrypoints=web"
- "traefik.http.routers.authelia-red.middlewares=https-redirect@docker" - "traefik.http.routers.authelia-red.middlewares=https-redirect@docker"
portainer:
image: portainer/portainer-ce:latest
container_name: portainer
restart: always
command: >
-H tcp://socket-proxy:2375
--admin-password=${PORTAINER_ADMIN_PASSWORD}
--no-analytics
volumes:
- portainer_data:/data
networks:
- socket-net
- proxy-net
labels:
- "traefik.enable=true"
# Public (HTTPS)
- "traefik.http.routers.portainer.rule=Host(`portainer.${DOMAIN}`)"
- "traefik.http.routers.portainer.entrypoints=websecure"
- "traefik.http.routers.portainer.tls=true"
- "traefik.http.routers.portainer.tls.certresolver=myresolver"
- "traefik.http.routers.portainer.middlewares=authelia-auth@docker"
- "traefik.http.routers.portainer.service=portainer-svc"
# Public (Redirect)
- "traefik.http.routers.portainer-red.rule=Host(`portainer.${DOMAIN}`)"
- "traefik.http.routers.portainer-red.entrypoints=web"
- "traefik.http.routers.portainer-red.middlewares=https-redirect@docker"
- "traefik.http.services.portainer-svc.loadbalancer.server.port=9000"
dozzle: dozzle:
image: amir20/dozzle:latest image: amir20/dozzle:latest
container_name: dozzle container_name: dozzle
@@ -354,6 +326,5 @@ networks:
external: true external: true
volumes: volumes:
portainer_data:
dozzle_data: dozzle_data:
+1 -1
View File
@@ -206,7 +206,7 @@ When `appctl` executes commands against a workload, environment variables are re
When `appctl sync` runs: When `appctl sync` runs:
1. `appctl_engine.py` reads all `~/Sites/*/app.yaml` files. 1. `appctl_engine.py` reads all `~/Sites/*/app.yaml` files.
2. Core services (`traefik`, `authelia`, `lldap`, `stalwart`, `snappymail`, `portainer`, `dozzle`) are assigned to `Core Infrastructure`. 2. Core services (`traefik`, `authelia`, `lldap`, `stalwart`, `snappymail`, `dozzle`) are assigned to `Core Infrastructure`.
3. Workload applications with `visible: true` are grouped by their `homepage.group` (ordered: `Core Infrastructure`, `Knowledge & Notes`, `Media & Productivity`, `Development & AI`, `Applications`). 3. Workload applications with `visible: true` are grouped by their `homepage.group` (ordered: `Core Infrastructure`, `Knowledge & Notes`, `Media & Productivity`, `Development & AI`, `Applications`).
4. Custom icons matching files in `config/homepage/icons/` (SVG or PNG) are mapped to `/icons/<name>`. 4. Custom icons matching files in `config/homepage/icons/` (SVG or PNG) are mapped to `/icons/<name>`.
5. The compiled configuration is written to `config/homepage/services.yaml`. 5. The compiled configuration is written to `config/homepage/services.yaml`.
+5 -7
View File
@@ -25,7 +25,7 @@ The runtime environment consists of four functional layers:
┌────────────────────────────────────────────────────────────────────────┐ ┌────────────────────────────────────────────────────────────────────────┐
│ 2. CONTROL & PLATFORM SERVICES (Core Compose Stack) │ │ 2. CONTROL & PLATFORM SERVICES (Core Compose Stack) │
│ Authelia SSO · LLDAP Directory · Stalwart Mail · SnappyMail │ │ Authelia SSO · LLDAP Directory · Stalwart Mail · SnappyMail │
│ Homepage Dashboard · Portainer · Dozzle · Watchtower · Diun │ │ Homepage Dashboard · Dozzle · Watchtower · Diun │
│ socket-proxy (Read-Only Docker API Barrier) │ │ socket-proxy (Read-Only Docker API Barrier) │
└───────────────────────────────────┬────────────────────────────────────┘ └───────────────────────────────────┬────────────────────────────────────┘
│ │
@@ -81,9 +81,8 @@ Orchestration coordinates operations across the runtime layers without being a r
- Outbound mail relay configured to route through an external smart host (Brevo SMTP relay via SOPS secrets). - Outbound mail relay configured to route through an external smart host (Brevo SMTP relay via SOPS secrets).
* **`snappymail`**: Webmail client accessible at `webmail.roadtotech.me` routing to Stalwart. * **`snappymail`**: Webmail client accessible at `webmail.roadtotech.me` routing to Stalwart.
### E. Portal & Observability (`homepage`, `portainer`, `dozzle`) ### E. Portal & Observability (`homepage`, `dozzle`)
* **`homepage`**: Service dashboard at `dashboard.roadtotech.me`. Synchronized from `app.yaml` manifests in `~/Sites` by `appctl sync`. * **`homepage`**: Service dashboard at `dashboard.roadtotech.me`. Synchronized from `app.yaml` manifests in `~/Sites` by `appctl sync`.
* **`portainer`**: Container management interface at `portainer.roadtotech.me`, connecting to Docker through `socket-proxy`.
* **`dozzle`**: Log viewing interface at `logs.roadtotech.me`, connecting through `socket-proxy`. * **`dozzle`**: Log viewing interface at `logs.roadtotech.me`, connecting through `socket-proxy`.
### F. Host Foundation & Daemons ### F. Host Foundation & Daemons
@@ -108,7 +107,7 @@ Homelab Core configures two bridge networks:
│ │ • traefik (router) • authelia (sso) │ │ │ │ • traefik (router) • authelia (sso) │ │
│ │ • lldap (directory) • stalwart (mail) │ │ │ │ • lldap (directory) • stalwart (mail) │ │
│ │ • snappymail (webmail) • homepage (dashboard) │ │ │ │ • snappymail (webmail) • homepage (dashboard) │ │
│ │ • portainer (management) • dozzle (logs) │ │ │ │ • dozzle (logs) │ │
│ │ • All User Workloads (~/Sites/*) │ │ │ │ • All User Workloads (~/Sites/*) │ │
│ └──────────────────────────────┬───────────────────────────────┘ │ │ └──────────────────────────────┬───────────────────────────────┘ │
│ │ │ │ │ │
@@ -116,9 +115,8 @@ Homelab Core configures two bridge networks:
│ │ socket-net (Bridge) │ │ │ │ socket-net (Bridge) │ │
│ │ │ │ │ │ │ │
│ │ • socket-proxy (HAProxy :2375) • traefik │ │ │ │ • socket-proxy (HAProxy :2375) • traefik │ │
│ │ • portainer • dozzle │ │ │ │ • dozzle • watchtower │ │
│ │ • watchtower • diun │ │ │ │ • diun • homepage │ │
│ │ • homepage │ │
│ └──────────────────────────────┬───────────────────────────────┘ │ │ └──────────────────────────────┬───────────────────────────────┘ │
│ │ (ro mount) │ │ │ (ro mount) │
│ ▼ │ │ ▼ │
+2 -2
View File
@@ -51,7 +51,7 @@ docker system prune -a --volumes --filter "until=168h"
Homelab Core runs several platform services managed by systemd: Homelab Core runs several platform services managed by systemd:
### `homeserver-core.service` (Core Compose Stack) ### `homeserver-core.service` (Core Compose Stack)
Manages the lifecycle of Traefik, Authelia, LLDAP, Stalwart, SnappyMail, Homepage, Portainer, Dozzle, Watchtower, and Diun. Manages the lifecycle of Traefik, Authelia, LLDAP, Stalwart, SnappyMail, Homepage, Dozzle, Watchtower, and Diun.
```bash ```bash
# Check service status # Check service status
@@ -211,7 +211,7 @@ User accounts and group memberships are managed dynamically in **LLDAP** rather
``` ```
### C. Docker Socket Communication Errors ### C. Docker Socket Communication Errors
* **Symptom**: Traefik fails to discover routers, or Dozzle/Portainer shows "Cannot connect to Docker daemon". * **Symptom**: Traefik fails to discover routers, or Dozzle shows "Cannot connect to Docker daemon".
* **Diagnosis**: * **Diagnosis**:
```bash ```bash
# Verify socket-proxy is running and healthy # Verify socket-proxy is running and healthy
+1 -1
View File
@@ -115,6 +115,6 @@ Homelab Core separates **user identity** from **static platform secrets**:
| **Auth Database** | `~/Core/config/authelia/db.sqlite3` | ❌ No | Authelia session database | | **Auth Database** | `~/Core/config/authelia/db.sqlite3` | ❌ No | Authelia session database |
| **Mail Data & Keys** | `~/Core/config/stalwart/` | ❌ No | Stalwart mail storage, DKIM keys, mailboxes | | **Mail Data & Keys** | `~/Core/config/stalwart/` | ❌ No | Stalwart mail storage, DKIM keys, mailboxes |
| **Webmail Storage** | `~/Core/config/snappymail/data/` | ❌ No | SnappyMail configuration and sessions | | **Webmail Storage** | `~/Core/config/snappymail/data/` | ❌ No | SnappyMail configuration and sessions |
| **Container Volumes** | Docker volume `portainer_data` | ❌ No | Portainer internal metadata | | **Container Volumes** | Docker volume `dozzle_data` | ❌ No | Dozzle UI preferences and state |
| **DDNS History** | `/var/lib/dynu/ip_history.jsonl` | ❌ No | Historical WAN IP transitions log | | **DDNS History** | `/var/lib/dynu/ip_history.jsonl` | ❌ No | Historical WAN IP transitions log |
| **GitOps State** | `~/.local/state/homelab/gitops/` | ❌ No | Deployment locks, pending JSONs, status logs | | **GitOps State** | `~/.local/state/homelab/gitops/` | ❌ No | Deployment locks, pending JSONs, status logs |
-2
View File
@@ -17,7 +17,6 @@
"gitops/webhook_secret" "gitops/webhook_secret"
"brevo/smtp_login" "brevo/smtp_login"
"brevo/smtp_key" "brevo/smtp_key"
"portainer/admin_password"
] (name: { owner = "kiskaadee"; }); ] (name: { owner = "kiskaadee"; });
# Generate the unified environment file at runtime in /run/secrets/homeserver.env # Generate the unified environment file at runtime in /run/secrets/homeserver.env
@@ -39,7 +38,6 @@
SMTP_PORT = "587"; SMTP_PORT = "587";
SMTP_LOGIN = config.sops.placeholder."brevo/smtp_login"; SMTP_LOGIN = config.sops.placeholder."brevo/smtp_login";
SMTP_KEY = config.sops.placeholder."brevo/smtp_key"; SMTP_KEY = config.sops.placeholder."brevo/smtp_key";
PORTAINER_ADMIN_PASSWORD = config.sops.placeholder."portainer/admin_password";
}; };
}; };
+2 -4
View File
@@ -4,8 +4,6 @@ authelia:
jwt_secret: ENC[AES256_GCM,data:C1FnoRi49PSaIZNp+SAS6Q5+odYwai75OR4UfvGx1Jk8wb4nVDUASpaOgm7ZFJysTX4WjuQi99PYyG5GshlHoJ5dVbLSFpEq7MSSiY8tZA2PqnHmIODNYARfFw6lB7udPjz8ANyU2UcrnwRKXnDD+T2Pa1uL9joW5rg7vWZlRks=,iv:IDZ2/wbmCPoR14b1imZrTJR5LuQp6V91tcZ/Z5Znl0w=,tag:d0UQ49QcEqgD+PCIBoOJ7Q==,type:str] jwt_secret: ENC[AES256_GCM,data:C1FnoRi49PSaIZNp+SAS6Q5+odYwai75OR4UfvGx1Jk8wb4nVDUASpaOgm7ZFJysTX4WjuQi99PYyG5GshlHoJ5dVbLSFpEq7MSSiY8tZA2PqnHmIODNYARfFw6lB7udPjz8ANyU2UcrnwRKXnDD+T2Pa1uL9joW5rg7vWZlRks=,iv:IDZ2/wbmCPoR14b1imZrTJR5LuQp6V91tcZ/Z5Znl0w=,tag:d0UQ49QcEqgD+PCIBoOJ7Q==,type:str]
traefik: traefik:
acme_email: ENC[AES256_GCM,data:U2IPYioGlfgSpfZy5E+2+VM0iXQ=,iv:zQ5Txq9H7mF7GcaZfyPPjSQFKa0736/DI7Y4XARMFqM=,tag:7Q4YN9OPA1rRVpXuapewQQ==,type:str] acme_email: ENC[AES256_GCM,data:U2IPYioGlfgSpfZy5E+2+VM0iXQ=,iv:zQ5Txq9H7mF7GcaZfyPPjSQFKa0736/DI7Y4XARMFqM=,tag:7Q4YN9OPA1rRVpXuapewQQ==,type:str]
portainer:
admin_password: ENC[AES256_GCM,data:Wxfx2K7qNZ+Ycq3VeyuID0wVDG4axTatYyiPTexi84azeGbFAekTrku4MkD3f/2ekZ7vAKCNKniP82J41RRw,iv:YO25AiU6Nqz2g55TahlmNCBgWQ6LkqjEC3Dtss2WDLo=,tag:QnLsvUkLublA+QDO9FbV+Q==,type:str]
dynu: dynu:
api_key: ENC[AES256_GCM,data:f4dAZjCplklE08kll1yGuYYYDKKTVEwvSL0d6fM9K+g=,iv:xjR/5lNfRXxTPWJ+WM+/qzZGWTMf7iNua/FoGwTYXTg=,tag:PuZZWUJ+WoZVcWDVKwxM9g==,type:str] api_key: ENC[AES256_GCM,data:f4dAZjCplklE08kll1yGuYYYDKKTVEwvSL0d6fM9K+g=,iv:xjR/5lNfRXxTPWJ+WM+/qzZGWTMf7iNua/FoGwTYXTg=,tag:PuZZWUJ+WoZVcWDVKwxM9g==,type:str]
user: ENC[AES256_GCM,data:RdKa9JmnllYQ,iv:2xW8vvzWvKp1rEV8G9fp+Jae38Wr3+lHAQ15htP3Sjs=,tag:tts/zHJqoBoK6vVnt7ho3A==,type:str] user: ENC[AES256_GCM,data:RdKa9JmnllYQ,iv:2xW8vvzWvKp1rEV8G9fp+Jae38Wr3+lHAQ15htP3Sjs=,tag:tts/zHJqoBoK6vVnt7ho3A==,type:str]
@@ -57,7 +55,7 @@ sops:
yvBksdjSVYITIR6E6sZJx4ujk8Gmu64UsHwxtASMZRQ60sUjLCo8+A== yvBksdjSVYITIR6E6sZJx4ujk8Gmu64UsHwxtASMZRQ60sUjLCo8+A==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
recipient: age1pln9sxy5j93lklqklfwp3qepx7x4cs4y2w63n9y3ykt68qgra5ysqleesg recipient: age1pln9sxy5j93lklqklfwp3qepx7x4cs4y2w63n9y3ykt68qgra5ysqleesg
lastmodified: "2026-09-23T15:58:24Z" lastmodified: "2026-09-23T20:04:29Z"
mac: ENC[AES256_GCM,data:zaCTuNOz6yDQ0stMXpThKDv+WogbpzuSBOEWB55JhgRMAgbNhSAvXJGtAx4TwQbFqLMcv0y8RS6/zJITZGQrzChDRE0m6ElTvwgkA7RMgWs2+GC96ZRm4J2sNFWvCELH+Wk14YynhCHqb63TqY0bbpI48SAk1yRqININfFuQxW4=,iv:EYabs7aCZPHvvZexWkKq9WuOrvPqWQ3E8qxS+JDSYto=,tag:4EecZyA8+YNTt/tfwIT/Dg==,type:str] mac: ENC[AES256_GCM,data:/ZtTAXnsDDzDaIiOSFIo1CgkIH+SwYvSqrUxGKExyYNyorPWu91g4tZKIPJhAgZA+Bv0W4ejPeT28zIAEH2rRhnceXEaH8ofAhIPt3V7AfF4Gwoyr+M51cbDpYkXbSUc3/Wq7whLp3ccP4QyJWUrTiHYZoC5XC4G0CszCSVPy0U=,iv:ul/wlsYMwQJr0vGmgOglebKXGQOEKIM3Jy4hxxEt8eU=,tag:oyKT44BEMHmheRf1NyML/g==,type:str]
unencrypted_suffix: _unencrypted unencrypted_suffix: _unencrypted
version: 3.13.3 version: 3.13.3
-2
View File
@@ -328,7 +328,6 @@ def get_core_services():
{"name": "lldap", "domain": "users.roadtotech.me", "container": "lldap", "desc": "Lightweight LDAP User & Group Directory"}, {"name": "lldap", "domain": "users.roadtotech.me", "container": "lldap", "desc": "Lightweight LDAP User & Group Directory"},
{"name": "stalwart", "domain": "mail.roadtotech.me", "container": "stalwart", "desc": "All-in-one Mail Server & JMAP/IMAP/SMTP"}, {"name": "stalwart", "domain": "mail.roadtotech.me", "container": "stalwart", "desc": "All-in-one Mail Server & JMAP/IMAP/SMTP"},
{"name": "snappymail", "domain": "webmail.roadtotech.me", "container": "snappymail", "desc": "Modern Lightweight Webmail Client"}, {"name": "snappymail", "domain": "webmail.roadtotech.me", "container": "snappymail", "desc": "Modern Lightweight Webmail Client"},
{"name": "portainer", "domain": "portainer.roadtotech.me", "container": "portainer", "desc": "Container Management GUI"},
{"name": "dozzle", "domain": "logs.roadtotech.me", "container": "dozzle", "desc": "Real-time Log Viewer"}, {"name": "dozzle", "domain": "logs.roadtotech.me", "container": "dozzle", "desc": "Real-time Log Viewer"},
{"name": "socket-proxy", "domain": "internal", "container": "socket-proxy", "desc": "Docker Socket Security Proxy"}, {"name": "socket-proxy", "domain": "internal", "container": "socket-proxy", "desc": "Docker Socket Security Proxy"},
{"name": "homepage", "domain": "dashboard.roadtotech.me", "container": "homepage", "desc": "Application Dashboard & System Portal"}, {"name": "homepage", "domain": "dashboard.roadtotech.me", "container": "homepage", "desc": "Application Dashboard & System Portal"},
@@ -759,7 +758,6 @@ def cmd_sync_homepage(args):
"lldap": {"title": "LLDAP Directory", "icon": "lldap.png", "weight": 25}, "lldap": {"title": "LLDAP Directory", "icon": "lldap.png", "weight": 25},
"stalwart": {"title": "Stalwart Mail", "icon": "email.png", "weight": 26}, "stalwart": {"title": "Stalwart Mail", "icon": "email.png", "weight": 26},
"snappymail": {"title": "Webmail", "icon": "email.png", "weight": 27}, "snappymail": {"title": "Webmail", "icon": "email.png", "weight": 27},
"portainer": {"title": "Portainer", "icon": "portainer.png", "weight": 30},
"dozzle": {"title": "Dozzle", "icon": "dozzle.png", "weight": 40}, "dozzle": {"title": "Dozzle", "icon": "dozzle.png", "weight": 40},
} }
for svc in get_core_services(): for svc in get_core_services():
@@ -64,3 +64,16 @@ def test_no_shell_true_in_core_scripts():
for py_file in scripts_dir.glob("*.py"): for py_file in scripts_dir.glob("*.py"):
content = py_file.read_text(encoding="utf-8") content = py_file.read_text(encoding="utf-8")
assert "shell=True" not in content, f"shell=True detected in {py_file.name}!" assert "shell=True" not in content, f"shell=True detected in {py_file.name}!"
def test_portainer_is_deprecated_and_absent():
"""Ensure portainer service and volume are completely absent from core docker-compose."""
compose_path = CORE_ROOT / "docker-compose.yml"
with open(compose_path, encoding="utf-8") as f:
compose = yaml.safe_load(f)
services = compose.get("services", {})
assert "portainer" not in services, "Deprecated service 'portainer' must not exist in docker-compose.yml"
volumes = compose.get("volumes", {}) or {}
assert "portainer_data" not in volumes, "Deprecated volume 'portainer_data' must not exist in docker-compose.yml"