Skip to content

Commit 29de839

Browse files
authored
Fix for occasional backend url generation failure
Update BACKEND_URL to use the gp command line utility, this appears to fix the occasional failure to generate the env variable on container start.
1 parent 7064d6b commit 29de839

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.gitpod.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ ports:
1111
onOpen: ignore
1212
tasks:
1313
- init: >
14-
(cp -n .env.example .env || true) &&
14+
(cp -n .env.example .env || true) &&
1515
pipenv install &&
1616
psql -U gitpod -c 'CREATE DATABASE example;' &&
1717
psql -U gitpod -c 'CREATE EXTENSION unaccent;' -d example &&
1818
bash database.sh &&
1919
python docs/assets/greeting.py back
2020
- command: >
21-
((sed -i /BACKEND_URL/d .env && echo "" >> .env && echo "BACKEND_URL=https://3001-${GITPOD_WORKSPACE_URL:8}" >> .env) || true) &&
21+
echo BACKEND_URL=$(gp url 3001) >> .env &&
2222
npm install &&
2323
python docs/assets/greeting.py front
2424
openMode: split-right

0 commit comments

Comments
 (0)