diff --git a/.gitpod.yml b/.gitpod.yml index a53dc9db6..b2887d25f 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,19 +1,22 @@ tasks: - - name: DB Server + - name: Database init: docker pull postgres:14-alpine command: docker run -p 5432:5432 -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=p0stgr3s postgres:14-alpine - - name: Logto Dev Mode + + - name: Logto dev init: | pnpm i pnpm prepack cd packages/core pnpm build cd - - pnpm cli connector add --official + pnpm cli connector add --official -p . command: | + gp ports await 5432 + sleep 3 export ENDPOINT=$(gp url 3001) pnpm cli db seed - pnpm -r --parallel --filter=!@logto/integration-tests dev + pnpm start:dev env: TRUST_PROXY_HEADER: 1 DB_URL: postgres://postgres:p0stgr3s@127.0.0.1:5432 diff --git a/package.json b/package.json index b4d131940..db8c7ab8c 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "version": "pnpm i --frozen-lockfile=false && git add pnpm-lock.yaml", "prepare": "if test \"$NODE_ENV\" != \"production\" && test \"$CI\" != \"true\" ; then husky install ; fi", "prepack": "pnpm -r prepack", - "dev": "pnpm -r prepack --incremental && pnpm -r --parallel --filter=!@logto/integration-tests dev", + "dev": "pnpm -r prepack --incremental && pnpm start:dev", + "start:dev": "pnpm -r --parallel --filter=!@logto/integration-tests dev", "start": "cd packages/core && NODE_ENV=production node .", "cli": "logto", "alteration": "logto db alt",