From 1d6c5003e8b68c3025016f78572484ca3892b1ec Mon Sep 17 00:00:00 2001 From: Hendrik Sokolowski Date: Sun, 28 Apr 2024 01:05:43 +0200 Subject: [PATCH] nachtigall: obs-portal: fix dependencies of docker network unit and portal --- hosts/nachtigall/apps/obs-portal.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hosts/nachtigall/apps/obs-portal.nix b/hosts/nachtigall/apps/obs-portal.nix index 0fd680dc..da6c5056 100644 --- a/hosts/nachtigall/apps/obs-portal.nix +++ b/hosts/nachtigall/apps/obs-portal.nix @@ -59,7 +59,8 @@ in { in { serviceConfig.Type = "oneshot"; - before = [ "docker-obs-portal.service" ]; + before = [ "docker-obs-portal.service" "docker-obs-portal-db.service" "docker-obs-portal-worker.service" ]; + requiredBy = [ "docker-obs-portal.service" "docker-obs-portal-db.service" "docker-obs-portal-worker.service" ]; script = '' ${dockerBin} network inspect obs-portal-net >/dev/null 2>&1 || ${dockerBin} network create obs-portal-net --subnet 172.20.0.0/24 ''; @@ -85,7 +86,11 @@ in { containers."obs-portal" = { image = "git.pub.solar/pub-solar/obs-portal:latest"; autoStart = true; - ports = [ "localhost:3001:${env.OBS_PORT}" ]; + ports = [ "127.0.0.1:3001:${env.OBS_PORT}" ]; + dependsOn = [ + "obs-portal-db" + "obs-portal-worker" + ]; environment = env; environmentFiles = [ config.age.secrets.obs-portal-env.path ];