Make the webserver wait for the setup task

This commit is contained in:
Andreas Zweili 2024-03-11 16:05:20 +01:00
parent 2b700728bd
commit 2f0a92adfc
1 changed files with 8 additions and 1 deletions

View File

@ -59,7 +59,14 @@
process-managers.process-compose.enable = true;
# https://github.com/cachix/devenv/blob/main/examples/process-compose/devenv.nix
processes = {
webserver.exec = "poetry run python ./src/manage.py runserver 0.0.0.0:$WEBPORT";
webserver = {
exec = "poetry run python ./src/manage.py runserver 0.0.0.0:$WEBPORT";
process-compose.depends_on = {
setup = {
condition = "process_completed_successfully";
};
};
};
setup.exec = "dev setup";
};
services.postgres = {