Skip to content

Commit 427dafa

Browse files
authored
fix(hosted): run the eSignet seeder once (#31)
Coolify gives a service that declares no restart policy `unless-stopped`, so the seeder exits 0 on success and is started again forever. Every other one-shot in the fleet already says `no`. Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
1 parent 18143bb commit 427dafa

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

‎compose.coolify.esignet.yaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ services:
101101

102102
esignet-seed:
103103
image: ${SOLMARA_ESIGNET_SEED_IMAGE:?set digest-pinned eSignet seed image}
104+
restart: "no"
104105
environment:
105106
PGHOST: esignet-database
106107
PGUSER: esignet

‎scripts/test_runtime_topology.py‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -791,6 +791,15 @@ def test_hosted_esignet_is_standalone_and_core_portal_owns_login_config(
791791
)
792792
self.assertNotIn("NIA_ESIGNET_CLIENT_PRIVATE_JWK", portal)
793793

794+
def test_hosted_esignet_seeder_runs_once(self) -> None:
795+
"""Coolify gives a service that declares no restart policy
796+
`unless-stopped`, so a one-shot that exits on success is started again
797+
forever. Every other one-shot in the fleet says `no`; the seeder must
798+
too."""
799+
esignet_path = SCRIPT.parents[1] / "compose.coolify.esignet.yaml"
800+
esignet = yaml.safe_load(esignet_path.read_text(encoding="utf-8"))
801+
self.assertEqual(esignet["services"]["esignet-seed"].get("restart"), "no")
802+
794803
def test_bruno_workspace_covers_only_the_eight_governed_v2_lookups(self) -> None:
795804
relay_requests = SCRIPT.parents[1] / "requests/registry-lab/50 - Relay V2"
796805
rendered = "\n".join(

0 commit comments

Comments
 (0)