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
8 changes: 4 additions & 4 deletions custom-domain/dstack-ingress/DNS_PROVIDERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This guide explains how to configure dstack-ingress to work with different DNS p
### Common Variables (Required for all providers)

- `DOMAIN` - Your custom domain (e.g., `app.example.com`)
- `GATEWAY_DOMAIN` - dstack gateway domain (e.g., `_.dstack-prod5.phala.network`)
- `GATEWAY_DOMAIN` - dstack gateway domain (e.g., `gateway.dstack-prod5.phala.network`)
- `CERTBOT_EMAIL` - Email for Let's Encrypt registration
- `TARGET_ENDPOINT` - Backend application endpoint to proxy to
- `DNS_PROVIDER` - DNS provider to use (`cloudflare`, `linode`, `namecheap`)
Expand Down Expand Up @@ -124,7 +124,7 @@ services:
# Common configuration
- DNS_PROVIDER=linode
- DOMAIN=app.example.com
- GATEWAY_DOMAIN=_.dstack-prod5.phala.network
- GATEWAY_DOMAIN=gateway.dstack-prod5.phala.network
- CERTBOT_EMAIL=admin@example.com
- TARGET_ENDPOINT=http://backend:8080

Expand All @@ -149,7 +149,7 @@ services:
# Common configuration
- DNS_PROVIDER=namecheap
- DOMAIN=app.example.com
- GATEWAY_DOMAIN=_.dstack-prod5.phala.network
- GATEWAY_DOMAIN=gateway.dstack-prod5.phala.network
- CERTBOT_EMAIL=admin@example.com
- TARGET_ENDPOINT=http://backend:8080

Expand Down Expand Up @@ -177,7 +177,7 @@ services:
environment:
DNS_PROVIDER: route53
DOMAIN: app.example.com
GATEWAY_DOMAIN: _.${DSTACK_GATEWAY_DOMAIN}
GATEWAY_DOMAIN: gateway.${DSTACK_GATEWAY_DOMAIN}

AWS_REGION: ${AWS_REGION}
AWS_ROLE_ARN: ${AWS_ROLE_ARN}
Expand Down
16 changes: 11 additions & 5 deletions custom-domain/dstack-ingress/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ services:
environment:
- CLOUDFLARE_API_TOKEN=${CLOUDFLARE_API_TOKEN}
- DOMAIN=*.myapp.com
- GATEWAY_DOMAIN=_.dstack-prod5.phala.network
- GATEWAY_DOMAIN=gateway.dstack-prod5.phala.network
- CERTBOT_EMAIL=${CERTBOT_EMAIL}
- SET_CAA=true
- TARGET_ENDPOINT=http://app:80
Expand Down Expand Up @@ -109,7 +109,7 @@ services:
DNS_PROVIDER: cloudflare
CLOUDFLARE_API_TOKEN: ${CLOUDFLARE_API_TOKEN}
CERTBOT_EMAIL: ${CERTBOT_EMAIL}
GATEWAY_DOMAIN: _.dstack-prod5.phala.network
GATEWAY_DOMAIN: gateway.dstack-prod5.phala.network
SET_CAA: true
DOMAINS: |
app.example.com
Expand Down Expand Up @@ -158,10 +158,16 @@ environment:
|----------|-------------|
| `DOMAIN` | Your domain (single-domain mode). Supports wildcards (`*.example.com`) |
| `TARGET_ENDPOINT` | Backend address, e.g. `app:80` or `http://app:80` |
| `GATEWAY_DOMAIN` | dstack gateway domain (e.g. `_.dstack-prod5.phala.network`) |
| `GATEWAY_DOMAIN` | dstack gateway domain (e.g. `gateway.dstack-prod5.phala.network`) |
| `ACME_EMAIL` | *(optional)* ACME contact address, in either mode. `CERTBOT_EMAIL` is the historical name and still works. See below — it is optional, and published |
| `DNS_PROVIDER` | DNS provider (`cloudflare`, `linode`, `namecheap`) |

`GATEWAY_DOMAIN` is published as your domain's CNAME target, so its first label
must start with a letter or digit. Android's resolver rejects a leading
underscore in an address lookup, CNAME target included, so the older
`_.<gateway-domain>` form resolves everywhere except Android. The label is
otherwise arbitrary — the gateway answers every name under its domain.

### Optional

| Variable | Default | Description |
Expand Down Expand Up @@ -330,7 +336,7 @@ services:
- TARGET_ENDPOINT=http://app:80
# Printed as the CNAME target, and used to verify that the hostname
# really resolves to the gateway before issuance starts.
- GATEWAY_DOMAIN=_.dstack-prod5.phala.network
- GATEWAY_DOMAIN=gateway.dstack-prod5.phala.network
# - ACME_EMAIL=you@example.com # optional, and published (see below)
# - DNS_SETUP_MODE=wait # default; blocks until the records exist
ports:
Expand All @@ -349,7 +355,7 @@ public DNS until they are visible:
DNS records required for app.example.com
==========================================================================
CNAME app.example.com
-> _.dstack-prod5.phala.network
-> gateway.dstack-prod5.phala.network
TXT _dstack-app-address.app.example.com
-> b1ea785543bbbb19ce9de33744321360992bf63b:443
CAA app.example.com
Expand Down
2 changes: 1 addition & 1 deletion custom-domain/dstack-ingress/docker-compose.multi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
DNS_PROVIDER: cloudflare
CLOUDFLARE_API_TOKEN: ${CLOUDFLARE_API_TOKEN}
CERTBOT_EMAIL: ${CERTBOT_EMAIL}
GATEWAY_DOMAIN: _.dstack-prod5.phala.network
GATEWAY_DOMAIN: gateway.dstack-prod5.phala.network
SET_CAA: true
DOMAINS: |
app.example.com
Expand Down Expand Up @@ -36,5 +36,5 @@
restart: unless-stopped

volumes:
letsencrypt:

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

View workflow job for this annotation

GitHub Actions / check-all

39:15 [empty-values] empty value in block mapping

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

View workflow job for this annotation

GitHub Actions / Basic Checks (dev.sh)

39:15 [empty-values] empty value in block mapping
evidences:

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

View workflow job for this annotation

GitHub Actions / check-all

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

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

View workflow job for this annotation

GitHub Actions / Basic Checks (dev.sh)

40:13 [empty-values] empty value in block mapping
4 changes: 2 additions & 2 deletions custom-domain/dstack-ingress/scripts/tests/e2e-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# CERTBOT_EMAIL - Email for Let's Encrypt registration
#
# Optional env vars:
# GATEWAY_DOMAIN - dstack gateway domain (default: _.dstack-prod5.phala.network)
# GATEWAY_DOMAIN - dstack gateway domain (default: gateway.dstack-prod5.phala.network)
# IMAGE - dstack-ingress image (default: dstacktee/dstack-ingress:latest)
# INSTANCE_TYPE - CVM instance type (default: tdx.small)
# CERTBOT_STAGING - Use LE staging (default: true)
Expand All @@ -27,7 +27,7 @@ set -uo pipefail
: "${DOMAIN:?DOMAIN is required}"
: "${CLOUDFLARE_API_TOKEN:?CLOUDFLARE_API_TOKEN is required}"
: "${CERTBOT_EMAIL:?CERTBOT_EMAIL is required}"
GATEWAY_DOMAIN="${GATEWAY_DOMAIN:-_.dstack-prod5.phala.network}"
GATEWAY_DOMAIN="${GATEWAY_DOMAIN:-gateway.dstack-prod5.phala.network}"
IMAGE="${IMAGE:-dstacktee/dstack-ingress:latest}"
INSTANCE_TYPE="${INSTANCE_TYPE:-tdx.small}"
CERTBOT_STAGING="${CERTBOT_STAGING:-true}"
Expand Down
2 changes: 1 addition & 1 deletion k3s/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
- DNS_PROVIDER=cloudflare
- CLOUDFLARE_API_TOKEN=${CLOUDFLARE_API_TOKEN}
- DOMAIN=*.${CLUSTER_DOMAIN}
- GATEWAY_DOMAIN=_.${DSTACK_GATEWAY_DOMAIN}
- GATEWAY_DOMAIN=gateway.${DSTACK_GATEWAY_DOMAIN}
- CERTBOT_EMAIL=${CERTBOT_EMAIL}
- SET_CAA=true
- TARGET_ENDPOINT=k3s:80
Expand All @@ -57,8 +57,8 @@
restart: unless-stopped

volumes:
k3s-data:

Check failure on line 60 in k3s/docker-compose.yaml

View workflow job for this annotation

GitHub Actions / check-all

60:12 [empty-values] empty value in block mapping

Check failure on line 60 in k3s/docker-compose.yaml

View workflow job for this annotation

GitHub Actions / Basic Checks (dev.sh)

60:12 [empty-values] empty value in block mapping
k3s-kubelet:

Check failure on line 61 in k3s/docker-compose.yaml

View workflow job for this annotation

GitHub Actions / check-all

61:15 [empty-values] empty value in block mapping

Check failure on line 61 in k3s/docker-compose.yaml

View workflow job for this annotation

GitHub Actions / Basic Checks (dev.sh)

61:15 [empty-values] empty value in block mapping
k3s-etc:
k3s-log:
cert-data:
Loading