From 3e9793eff71158ed08a4f30228a4732e79fc0d8d Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Fri, 5 Jun 2026 05:26:34 -0400 Subject: [PATCH] fix(docker-dev): persist dev SQL ConfigDb on a named volume The docker-dev sql service had no volume, so its data lived in the container writable layer. A recreate silently dropped the OtOpcUa database and every host node failed its configdb health check (AdminUI 503) until an operator re-ran 'dotnet ef database update' + the cluster-seed. Add a named volume (otopcua-mssql-data -> /var/opt/mssql) so the migrated schema + seeded clusters survive 'docker compose up' cycles. --- docker-dev/docker-compose.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docker-dev/docker-compose.yml b/docker-dev/docker-compose.yml index 76fbb1b7..5f1e3945 100644 --- a/docker-dev/docker-compose.yml +++ b/docker-dev/docker-compose.yml @@ -51,6 +51,13 @@ services: MSSQL_PID: Developer ports: - "14330:1433" + # Persist the ConfigDb across container recreates. Without this the dev SQL + # is ephemeral (container writable layer), so a recreate silently drops the + # OtOpcUa database and every host node fails its configdb health check until + # EF auto-migration + cluster-seed rebuild it. The named volume keeps the + # schema + seeded clusters between `docker compose up` cycles. + volumes: + - otopcua-mssql-data:/var/opt/mssql healthcheck: test: ["CMD-SHELL", "/opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P 'OtOpcUa!Dev123' -No -Q 'SELECT 1' || exit 1"] interval: 10s @@ -307,3 +314,7 @@ services: - site-a-2 - site-b-1 - site-b-2 + +volumes: + # SQL Server data dir — persists the OtOpcUa ConfigDb across container recreates. + otopcua-mssql-data: