forked from owid/owid-grapher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitpod.yml
50 lines (46 loc) · 1.51 KB
/
.gitpod.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
image: gitpod/workspace-mysql
ports:
# express server
- port: 3030
onOpen: open-browser
# mysql server
- port: 3306
onOpen: ignore
- port: 33060
onOpen: ignore
# vite server
- port: 8090
onOpen: ignore
tasks:
# set everything up
# this is run in the prebuild state and should be ready when launching a new workspace
- init: |
gp await-port 3306 && ./db/downloadAndCreateDatabase.sh
mysql -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY '';"
nvm install
npm install -g yarn
git clone https://github.com/owid/owid-content
yarn install
cp .env.example .env && echo $'\n' >> .env
tsc -b
gp sync-done initial-setup
# setting env variables required for Gitpod, because it doesn't run on localhost
command: |
echo VITE_DEV_URL=$(gp url 8090) >> .env
echo BAKED_BASE_URL=$(gp url 3030) >> .env
echo ADMIN_BASE_URL=$(gp url 3030) >> .env
# wait for initial-setup (above) to finish and then start vite server
- init: gp sync-await initial-setup
command: yarn startViteServer
# wait for initial-setup (above) to finish and then start admin server
- init: gp sync-await initial-setup
command: yarn startAdminDevServer
github:
prebuilds:
branches: true
pullRequests: true
addCheck: false
vscode:
extensions:
- dbaeumer.vscode-eslint
- esbenp.prettier-vscode