-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path.gitpod.yml
61 lines (59 loc) · 1.88 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
52
53
54
55
56
57
58
59
60
61
tasks:
- name: Development Environment
init: |
echo "STORAGE_BUCKET_URL=https://4001-${GITPOD_WORKSPACE_URL#https://}" > .env
echo "HASURA_GRAPHQL_ADMIN_SECRET=myadminsecretkey" >> .env
docker compose -f docker-compose.yml up -d &&
echo "Waiting for Hasura to be ready..." &&
until curl -s -f -o /dev/null "https://8080-${GITPOD_WORKSPACE_URL#https://}/healthz"; do
sleep 2
done &&
curl -L https://github.com/hasura/graphql-engine/raw/stable/cli/get.sh | bash &&
# Install frontend dependencies
if [ -d "frontend-nx" ]; then
cd frontend-nx &&
yarn install --ignore-engines &&
cd ..
else
echo "frontend-nx directory not found!"
fi
command: |
# Start Hasura console
if [ -d "backend" ]; then
cd backend &&
source ../.env &&
echo "Environment is ready! You can now use Hasura Console with:" &&
echo "hasura console --endpoint https://8080-${GITPOD_WORKSPACE_URL#https://} --address 0.0.0.0" &&
hasura console --endpoint https://8080-${GITPOD_WORKSPACE_URL#https://} --address 0.0.0.0 &
cd ..
fi
# Start frontend development
if [ -d "frontend-nx" ]; then
cd frontend-nx &&
export NEXT_PUBLIC_STORAGE_BUCKET_URL=https://4001-${GITPOD_WORKSPACE_URL#https://}/emulated-bucket &&
export NEXT_PUBLIC_ENVIRONMENT=development &&
yarn dev
else
echo "frontend-nx directory not found!"
fi
ports:
- port: 5000
onOpen: open-browser
visibility: public
- port: 5001
onOpen: open-browser
visibility: public
- port: 42000
onOpen: ignore
- port: 42001-42024
onOpen: ignore
- port: 4001
onOpen: ignore
- port: 8080
onOpen: ignore
visibility: public
- port: 28080
onOpen: ignore
- port: 9695
onOpen: open-browser
visibility: public