From 3873bde4fcbe4daa3a8e948c185f50a77a3b94b1 Mon Sep 17 00:00:00 2001 From: Daniel Bimschas <daniel.bimschas@inoio.de> Date: Mon, 11 Jul 2022 16:46:44 +0100 Subject: [PATCH] HOLI-1785: address review and some minor improvements --- init.sh | 15 +++++++++++++-- mprocs-local-backend.json | 10 ++++++---- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/init.sh b/init.sh index c92f9c5..4a0c2a3 100755 --- a/init.sh +++ b/init.sh @@ -36,7 +36,7 @@ fi isAvailable nvm || isAvailable nodenv || { echo >&2 "Neither nvm nor nodenv are installed. Please install one of them according to README.md and run $0 again afterwards"; exit 1; } ensureAvailable ory -ensureAvailable emulator +#ensureAvailable emulator ensureAvailable docker-compose # dependencies we can auto-install @@ -57,6 +57,9 @@ popd git clone git@gitlab.com:holisticfoundation/holi-okuna.git holi-okuna >/dev/null 2>&1 || true pushd holi-okuna direnv allow . +source .venv/bin/activate +pip install -r requirements-cli-only.txt +pip install -r requirements.txt popd git clone git@gitlab.com:holisticfoundation/holi-unified-api.git holi-unified-api >/dev/null 2>&1 || true @@ -75,5 +78,13 @@ cat << EOF All set up. You can now set up the projects in your IDE and start a development environment. -For starting it, execute \`mprocs\`. +For starting it, execute + +\`mprocs\` + + or + +\`mprocs -c mprocs-local-backend.json\` + +if you also want to run the locally. EOF diff --git a/mprocs-local-backend.json b/mprocs-local-backend.json index a95e459..de9c832 100644 --- a/mprocs-local-backend.json +++ b/mprocs-local-backend.json @@ -19,15 +19,17 @@ "cwd": "<CONFIG_DIR>/holi-unified-api/oathkeeper" }, "unified-api": { - "shell": "./wait-for-port.sh 8000; cd holi-unified-api; yarn dev" + "comment": "we wait for Django (port 8000), otherwise starting GraphQL mesh will fail", + "shell": "../wait-for-port.sh 8000; yarn dev", + "cwd": "<CONFIG_DIR>/holi-unified-api" }, "okuna-services": { - "shell": "pip3 install -r requirements-cli-only.txt; python3 okuna-cli.py up-services-only", + "shell": "source .venv/bin/activate && python okuna-cli.py up-services-only", "cwd": "<CONFIG_DIR>/holi-okuna" }, "okuna-server": { - "comment": "Before starting the server process, the services need to be up. Therefore, we wait until the services are up via a small until loop.", - "shell": "until docker ps|grep okuna-worker; do sleep 1; done; source .venv/bin/activate; pip3 install -r requirements.txt; python3 manage.py runserver localhost:8000 || echo 'maybe you need to execute \"python manage.py migrate\" again?'", + "comment": "we wait for postgres (port 5432), otherwise starting Django will fail", + "shell": "../wait-for-port.sh 5432; source .venv/bin/activate && python manage.py runserver localhost:8000 || echo 'maybe you need to execute \"python manage.py migrate\" again?'", "cwd": "<CONFIG_DIR>/holi-okuna" } } -- GitLab