From 56d0d07d26773e3edd62a8778dca4be7f9fe3a32 Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 2 Jun 2023 22:53:54 +0200 Subject: [PATCH] cluster/services/ipfs: add consul service for gateway --- cluster/services/ipfs/gateway.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/cluster/services/ipfs/gateway.nix b/cluster/services/ipfs/gateway.nix index f0f2cba..f558917 100644 --- a/cluster/services/ipfs/gateway.nix +++ b/cluster/services/ipfs/gateway.nix @@ -56,4 +56,19 @@ in }; }; }; + + consul.services.ipfs-gateway = { + mode = "external"; + unit = "ipfs"; + definition = { + name = "ipfs-gateway"; + address = gw.ipv4; + inherit (gw) port; + checks = lib.singleton { + interval = "60s"; + http = "${gw.url}/ipfs/QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn/"; # empty directory + method = "HEAD"; + }; + }; + }; }