-
Notifications
You must be signed in to change notification settings - Fork 234
/
.gitpod.yml
51 lines (51 loc) · 1.63 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
51
image:
file: .gitpod/Dockerfile
tasks:
- name: Frontend
init: |
touch /tmp/.frontend-built-lock
echo -e "\n- Downloading dependencies..\n"
cd web && yarn
echo -e "\n- Building frontend..\n"
yarn build
rm /tmp/.frontend-built-lock
- name: Backend
init: |
echo -e "\n- Setting up database..\n"
cd && go install github.com/jackc/tern@latest
cd /tmp && git clone https://github.com/pgpartman/pg_partman && cd pg_partman && sudo make NO_BGW=1 install
psql -c 'create database hub'
cd /workspace/hub/database/migrations && TERN_CONF=/workspace/hub/.gitpod/tern.conf ./migrate.sh
echo -e "\n- Downloading Go modules..\n"
cd /workspace/hub && go mod download
echo -e "\n- Running tracker..\n"
mkdir ~/.cfg
cp /workspace/hub/.gitpod/*.yaml ~/.cfg
cd /workspace/hub/cmd/tracker && go run *.go
echo -e "\n- Waiting for frontend build to complete..\n"
sleep 1 && while [ -f /tmp/.frontend-built-lock ]; do sleep 1; done
command: |
echo -e "\n- Running hub..\n"
echo -e "\nOnce the hub is ready, you can log in using the following credentials:\n"
echo -e "\tEmail: [email protected]"
echo -e "\tPassword: changeme\n"
mkdir ~/.cfg
cp /workspace/hub/.gitpod/*.yaml ~/.cfg
cd /workspace/hub/cmd/hub && go run *.go
ports:
- port: 3000
onOpen: ignore
- port: 5432
onOpen: ignore
- port: 8000
onOpen: notify
- port: 8001
onOpen: ignore
github:
prebuilds:
master: true
branches: false
pullRequests: false
pullRequestsFromForks: true
addCheck: false
addComment: false