Custom Domains and Managing a Stack
ជំពូកនេះមិនទាន់ត្រូវបានបកប្រែជាភាសាខ្មែរនៅឡើយទេ — សូមអានជាភាសាអង់គ្លេសខាងក្រោម។
Table of Contents
- Add a domain while creating a stack
- Add a domain to an existing stack
- Configure DNS
- Checking stack state
- Updating and deleting a stack
- Beginner Pitfalls
1. Add a domain while creating a stack
- Click Create Stack.
- Provide the stack information (see Part 1), add your domain, then click Create & Deploy. This deploys your application directly.
2. Add a domain to an existing stack
- Click the ellipsis (three dots) menu on your stack.
- From the dropdown, click Edit.
- Add your domain, then click Update or Pull & Update. This deploys your application directly.
- Click on the stack to view its details.
- Make sure the state is Running — the CNAME only works correctly once the stack is running.
- Locate the Domain Name and CNAME value on the stack details page, and copy the CNAME.
3. Configure DNS
Add a CNAME record with your DNS provider (e.g. Cloudflare):
| Setting | Value |
|---|---|
| Type | CNAME |
| Name | @ for the root domain, or your subdomain (e.g. www) |
| Target | The CNAME value from mysabay.com (e.g. abc123.sabay.com) |
| Proxy status | DNS only (turn off the proxy / grey cloud in Cloudflare) |
After saving, the new CNAME record should appear in your DNS provider's management table.
Wait for DNS propagation — usually 5–30 minutes, though it can take up to 24 hours to fully propagate globally.
4. Checking stack state
Open a stack to view its details. Its state must be Running for features like the domain/CNAME to work correctly — if DNS or your app isn't behaving as expected, check this first.
Each service's own Service Info tab (in the deployed stack view) shows:
- Container Image, Restart Policy, and Resource — read-only mirrors of what was set when creating/editing the service.
- Host Name — the domain you assigned this service.
- Domain Generate — an auto-assigned
*.sabay.comsubdomain for this service. - Service Network — an internal Docker network name for this service,
formatted
uid-<account-uid>-cca-<stack-name>_<service-name>(e.g.uid-39789111-cca-run-app-hello_ui). Other services in the same stack can reach this one directly over this internal network athttp://<service-network-value>:<container-port>, without going through a public domain — see Part 4 for howmulti-service-stackuses this.
Start/Stop/Restart controls for the service are also available from this view.
5. Updating and deleting a stack
Update:
- Click the ellipsis (three dots) menu on your stack.
- Click Edit, change whatever fields you need (including domain).
- Click Update or Pull & Update to redeploy with your changes.
Delete:
- Click the ellipsis (meatballs menu) on the stack you want to remove, then click Remove.
- A confirmation pop-up will ask you to confirm the deletion.
- Once confirmed, the stack processes deletion; completion is shown via a pop-up in the corner of the screen.
6. Beginner Pitfalls
- Checking DNS before the stack is Running. The CNAME target only resolves correctly once the stack's state shows Running — check that first if a custom domain doesn't seem to work.
- Expecting DNS changes instantly. Propagation is usually 5–30 minutes but can take up to 24 hours — don't assume a misconfiguration just because it hasn't resolved yet.
- Leaving the CDN proxy on for the CNAME record. In Cloudflare specifically, the record needs "DNS only" (grey cloud), not the orange-cloud proxy.
- Confusing "Domain Generate" with "Host Name". "Domain Generate" is
an auto-assigned
*.sabay.comsubdomain Run App gives you regardless; "Host Name" is the custom domain you explicitly assigned.
ទិញកាហ្វេជូនខ្ញុំ
ចូលចិត្តមេរៀននេះមែនទេ? សូមពិចារណាទិញកាហ្វេជូនខ្ញុំមួយកែវ ដើម្បីគាំទ្រការបង្កើតមាតិកាឥតគិតថ្លៃបន្ថែមទៀត!