File tree Expand file tree Collapse file tree 4 files changed +16
-2
lines changed
custom-domain/dstack-ingress Expand file tree Collapse file tree 4 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,7 @@ services:
7676 - SET_CAA=true
7777 - TARGET_ENDPOINT=http://app:80
7878 volumes :
79+ - /var/run/dstack.sock:/var/run/dstack.sock
7980 - /var/run/tappd.sock:/var/run/tappd.sock
8081 - cert-data:/etc/letsencrypt
8182 restart : unless-stopped
@@ -146,6 +147,7 @@ services:
146147 - SET_CAA=true
147148 - TARGET_ENDPOINT=grpc://app:50051
148149 volumes:
150+ - /var/run/dstack.sock:/var/run/dstack.sock
149151 - /var/run/tappd.sock:/var/run/tappd.sock
150152 - cert-data:/etc/letsencrypt
151153 restart: unless-stopped
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ services:
1111 - SET_CAA=true
1212 - TARGET_ENDPOINT=http://app:80
1313 volumes :
14+ - /var/run/dstack.sock:/var/run/dstack.sock
1415 - /var/run/tappd.sock:/var/run/tappd.sock
1516 - cert-data:/etc/letsencrypt
1617 restart : unless-stopped
Original file line number Diff line number Diff line change @@ -103,7 +103,14 @@ set_txt_record() {
103103 local APP_ID
104104
105105 # Generate a unique app ID if not provided
106- APP_ID=${APP_ID:- $(curl -s --unix-socket / var/ run/ tappd.sock http:// localhost/ prpc/ Tappd.Info | jq -j ' .app_id' )}
106+ if [[ -e /var/run/dstack.sock ]]; then
107+ DSTACK_APP_ID=$( curl -s --unix-socket /var/run/dstack.sock http://localhost/Info | jq -j .app_id)
108+ export DSTACK_APP_ID
109+ else
110+ DSTACK_APP_ID=$( curl -s --unix-socket /var/run/tappd.sock http://localhost/prpc/Tappd.Info | jq -j .app_id)
111+ export DSTACK_APP_ID
112+ fi
113+ APP_ID=${APP_ID:- " $DSTACK_APP_ID " }
107114
108115 # Use the unified DNS manager to set the TXT record
109116 source /opt/app-venv/bin/activate
Original file line number Diff line number Diff line change @@ -19,7 +19,11 @@ while [ ${#PADDED_HASH} -lt 128 ]; do
1919done
2020QUOTED_HASH=" ${PADDED_HASH} "
2121
22- curl -s --unix-socket /var/run/tappd.sock " http://localhost/prpc/Tappd.RawQuote?report_data=${QUOTED_HASH} " > quote.json
22+ if [[ -e /var/run/dstack.sock ]]; then
23+ curl -s --unix-socket /var/run/dstack.sock " http://localhost/prpc/GetQuote?report_data=${QUOTED_HASH} " > quote.json
24+ else
25+ curl -s --unix-socket /var/run/tappd.sock " http://localhost/prpc/Tappd.RawQuote?report_data=${QUOTED_HASH} " > quote.json
26+ fi
2327if [ $? -ne 0 ]; then
2428 echo " Error: Failed to generate evidences"
2529 exit 1
You can’t perform that action at this time.
0 commit comments