Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions custom-domain/dstack-ingress/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ services:
- SET_CAA=true
- TARGET_ENDPOINT=http://app:80
volumes:
- /var/run/dstack.sock:/var/run/dstack.sock
- /var/run/tappd.sock:/var/run/tappd.sock
- cert-data:/etc/letsencrypt
restart: unless-stopped
Expand Down Expand Up @@ -146,6 +147,7 @@ services:
- SET_CAA=true
- TARGET_ENDPOINT=grpc://app:50051
volumes:
- /var/run/dstack.sock:/var/run/dstack.sock
- /var/run/tappd.sock:/var/run/tappd.sock
- cert-data:/etc/letsencrypt
restart: unless-stopped
Expand Down
1 change: 1 addition & 0 deletions custom-domain/dstack-ingress/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- SET_CAA=true
- TARGET_ENDPOINT=http://app:80
volumes:
- /var/run/dstack.sock:/var/run/dstack.sock
- /var/run/tappd.sock:/var/run/tappd.sock
- cert-data:/etc/letsencrypt
restart: unless-stopped
Expand All @@ -20,4 +21,4 @@
restart: unless-stopped

volumes:
cert-data:

Check failure on line 24 in custom-domain/dstack-ingress/docker-compose.yaml

View workflow job for this annotation

GitHub Actions / check-all

24:13 [empty-values] empty value in block mapping

Check failure on line 24 in custom-domain/dstack-ingress/docker-compose.yaml

View workflow job for this annotation

GitHub Actions / Basic Checks (dev.sh)

24:13 [empty-values] empty value in block mapping
9 changes: 8 additions & 1 deletion custom-domain/dstack-ingress/scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,14 @@ set_txt_record() {
local APP_ID

# Generate a unique app ID if not provided
APP_ID=${APP_ID:-$(curl -s --unix-socket /var/run/tappd.sock http://localhost/prpc/Tappd.Info | jq -j '.app_id')}
if [[ -e /var/run/dstack.sock ]]; then
DSTACK_APP_ID=$(curl -s --unix-socket /var/run/dstack.sock http://localhost/Info | jq -j .app_id)
export DSTACK_APP_ID
else
DSTACK_APP_ID=$(curl -s --unix-socket /var/run/tappd.sock http://localhost/prpc/Tappd.Info | jq -j .app_id)
export DSTACK_APP_ID
fi
APP_ID=${APP_ID:-"$DSTACK_APP_ID"}

# Use the unified DNS manager to set the TXT record
source /opt/app-venv/bin/activate
Expand Down
6 changes: 5 additions & 1 deletion custom-domain/dstack-ingress/scripts/generate-evidences.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ while [ ${#PADDED_HASH} -lt 128 ]; do
done
QUOTED_HASH="${PADDED_HASH}"

curl -s --unix-socket /var/run/tappd.sock "http://localhost/prpc/Tappd.RawQuote?report_data=${QUOTED_HASH}" > quote.json
if [[ -e /var/run/dstack.sock ]]; then
curl -s --unix-socket /var/run/dstack.sock "http://localhost/prpc/GetQuote?report_data=${QUOTED_HASH}" > quote.json
else
curl -s --unix-socket /var/run/tappd.sock "http://localhost/prpc/Tappd.RawQuote?report_data=${QUOTED_HASH}" > quote.json
fi
if [ $? -ne 0 ]; then
echo "Error: Failed to generate evidences"
exit 1
Expand Down
Loading