diff --git a/init.sh b/init.sh index c92f9c5f30c8d01014ef3a3feed00933a92b85f3..4a0c2a384f4adcad2eda409309c41a835e6dc2d1 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 a95e459e2cdead0d4b73e4e57bfc03d6dc6eae66..de9c8325db64489420fe1e20965c07d771740d4e 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" } }