# The repos of the stack, one line per repo: # # directory|setup command|run command # # directory is a sibling of this repo on the host, bind mounted at # /workspaces/ (see .devcontainer/devcontainer.json). # setup runs once, when the container is created (post-create.sh). # run starts that repo's dev server (dev.sh). Leave it empty for a repo that # has nothing to run. # # Both commands run with the repo directory as the working directory, through # `bash -c`, so shell syntax is available. # The run command is the rest of the line, so it may contain `|`; the setup # command may not. # # Watch out. dev.sh signals the process it starts. Wrappers that do not forward # signals leave the server running after Ctrl-C: `go run` is one, so build a # binary and run that instead. Calling a package manager's `dev` script is # usually fine, but calling the binary directly (`./node_modules/.bin/vite`) is # one process less to orphan. SERVICES=( "my-backend|go mod download|mkdir -p .dev && go build -o .dev/server ./cmd/server && exec ./.dev/server" "my-frontend|pnpm install --config.confirmModulesPurge=false|./node_modules/.bin/vite" )