init gitpod for creator env.local rootURL

This commit is contained in:
殷亮辉 2022-01-14 06:15:21 +00:00
parent f9dedd1cea
commit c04943000c
3 changed files with 8 additions and 1 deletions

View File

@ -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

6
.scripts/gitpod_setup.sh Normal file
View File

@ -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

View File

@ -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/",