Skip to content

Commit a4479c5

Browse files
committed
feat: update phala cloud default prelaunch script which expose DSTACK_GATEWAY_DOMAIN
1 parent 94cae0a commit a4479c5

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

phala-cloud-prelaunch-script/prelaunch.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
echo "----------------------------------------------"
3-
echo "Running Phala Cloud Pre-Launch Script v0.0.5"
3+
echo "Running Phala Cloud Pre-Launch Script v0.0.6"
44
echo "----------------------------------------------"
55
set -e
66

@@ -146,6 +146,11 @@ if [[ -e /var/run/dstack.sock ]]; then
146146
else
147147
export DSTACK_APP_ID=$(curl -s --unix-socket /var/run/tappd.sock http://dstack/prpc/Tappd.Info | jq -j .app_id)
148148
fi
149+
# Check if app-compose.json has default_gateway_domain field and DSTACK_GATEWAY_DOMAIN is not set
150+
# If true, set DSTACK_GATEWAY_DOMAIN from app-compose.json
151+
if [[ $(jq 'has("default_gateway_domain")' app-compose.json) == "true" && -z "$DSTACK_GATEWAY_DOMAIN" ]]; then
152+
export DSTACK_GATEWAY_DOMAIN=$(jq -j '.default_gateway_domain' app-compose.json)
153+
fi
149154

150155
echo "----------------------------------------------"
151156
echo "Script execution completed"

0 commit comments

Comments
 (0)