feat: fix supabase
This commit is contained in:
parent
d611a1ff05
commit
541d2fc43d
2 changed files with 165 additions and 0 deletions
|
|
@ -74,6 +74,27 @@ in
|
|||
ExecStart = "${envGenerateScript} ${config.sops.secrets.supabase-env.path}";
|
||||
};
|
||||
};
|
||||
# Seed the edge-runtime's bootstrap `main` function. The container's
|
||||
# entrypoint requires `/home/deno/functions/main/index.ts` to exist;
|
||||
# without it edge-runtime fails with "could not find an appropriate
|
||||
# entrypoint". Re-seed on every activation so updates to the bootstrap
|
||||
# are picked up, while leaving user-authored functions untouched.
|
||||
supabase-functions-seed = {
|
||||
description = "Seed Supabase edge-functions main bootstrap";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
script = ''
|
||||
install -d -m 0755 /var/lib/supabase/functions/main
|
||||
install -m 0644 ${./functions/main/index.ts} /var/lib/supabase/functions/main/index.ts
|
||||
'';
|
||||
};
|
||||
podman-supabase-functions = {
|
||||
after = [ "supabase-functions-seed.service" ];
|
||||
requires = [ "supabase-functions-seed.service" ];
|
||||
};
|
||||
}
|
||||
]);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue