process-compose: simplify environment

we already are in the right devshell for clan-app, so we no longer need
direnv exec. Instead of depending on implicit enviroment variables we
can run change the directory based on the git root as this is easier to
read and follow.
This commit is contained in:
Jörg Thalheim
2025-05-15 13:50:18 +02:00
parent bebab7691f
commit 3369e56d35

View File

@@ -1,24 +1,20 @@
version: "0.5"
env_cmds:
PRJ_ROOT: "git rev-parse --show-toplevel"
processes:
webview-ui:
command: |
cd $(git rev-parse --show-toplevel)/pkgs/clan-app/webview-ui/app
direnv allow
direnv exec . npm install
direnv exec . vite
ready_log_line: "VITE"
working_dir: "$PRJ_ROOT/pkgs/clan-app/webview-ui/app"
clan-app:
command: |
direnv allow
direnv exec . ./bin/clan-app --debug --content-uri http://localhost:3000
cd $(git rev-parse --show-toplevel)/pkgs/clan-app
./bin/clan-app --debug --content-uri http://localhost:3000
depends_on:
webview-ui:
condition: "process_log_ready"
is_foreground: true
ready_log_line: "Debug mode enabled"
working_dir: "$PRJ_ROOT/pkgs/clan-app"