diff --git a/.gitpod.yml b/.gitpod.yml index 5bc6267577..b1dd7c2019 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -15,6 +15,7 @@ ports: visibility: public # List the start up tasks. You can start them in parallel in multiple terminals. See https://www.gitpod.io/docs/config-start-tasks/ tasks: + - init: sh ./.scripts/gitpod_setup.sh - name: Mongo init: | mkdir -p /workspace/mongodb/data/db diff --git a/.scripts/gitpod_setup.sh b/.scripts/gitpod_setup.sh new file mode 100644 index 0000000000..48a7825ed3 --- /dev/null +++ b/.scripts/gitpod_setup.sh @@ -0,0 +1,6 @@ +# create .env.local +cp creator/.env creator/.env.local + +# replace ROOT_URL +root_replacement="ROOT_URL=$(gp url 3100)" +sed -i "/^ROOT_URL=*/c$root_replacement" creator/.env.local \ No newline at end of file diff --git a/creator/package.json b/creator/package.json index 227b11d226..93183aaf58 100644 --- a/creator/package.json +++ b/creator/package.json @@ -3,7 +3,7 @@ "version": "1.22.0-alpha.3", "private": true, "scripts": { - "start": "env-cmd -f ./.env meteor run --settings settings.json --port 3100", + "start": "env-cmd -f ./.env.local meteor run --settings settings.json --port 3100", "startv": "env-cmd -f ./.env meteor run --verbose --settings settings.json --port 3100", "build": "yarn && rm -rf .dist/bundle && cross-env TOOL_NODE_FLAGS=--max-old-space-size=9800 meteor build --directory .dist --server-only && node .scripts/build-after.js", "testbuild": "cp -rf .dist/* ../steedos-contracts-app/node_modules/steedos-server/",