fix(nix): add migrations

This commit is contained in:
asleepyskye 2025-08-15 13:40:55 -04:00
parent 3c4644f3cc
commit ae9d818f4b
2 changed files with 18 additions and 1 deletions

View file

@ -195,6 +195,22 @@
# TODO: add liveness check
ready_log_line = "Received Ready";
};
### migrations ###
pluralkit-migrate-init = mkServiceInitProcess {
name = "migrate";
};
pluralkit-migrate = {
command = pkgs.writeShellApplication {
name = "pluralkit-migrate";
text = ''
${sourceDotenv}
set -x
exec target/debug/migrate
'';
};
depends_on.postgres.condition = "process_healthy";
depends_on.pluralkit-migrate-init.condition = "process_completed_successfully";
};
### gateway ###
pluralkit-gateway-init = mkServiceInitProcess {
name = "gateway";