CaaS
Container management
Custom domains

Custom domains

To access your services, we provide you random test urls running on scaledynamics.site, or scaledynamics.cloud. In this page you describe how you can connect a custom domain to a service, for example api.yourcompany.com.

Assign your custom domain during the deployment

ℹ️

You can only set one custom domain per service per environment and you can't change it later. If you want to change it, you need to delete the service/environment and create a new one.

You can assign your custom domain during the first deployment of your services. Indeed, interactively you have to provide an url for each service you deploy the first time.

Suppose you want one docker service available at api.yourcompany.com.

Use the deploy command. When asked to provide the url, enter api.yourcompany.com.

The command will dump something like that

Base URL ID 'docker' with hostname 'api.yourcompany.com' added.
Please deploy:
  - a DNS CNAME record under the name 'xxxxx.api.yourcompany.com' with value 'api.yourcompany.com.scaledynamics.link.' before deploying
  - a DNS CNAME record under the name 'api.yourcompany.com' with value 'xxxxx.scaledynamics.site.' when you want your URL live

And the command will stop. Now follow the guideline and add those two DNS CNAME records with the value provided in your domain name provider's DNS configuration.

When done, launch the deploy command again.

:::caution The deploy can be done only if the first DNS CNAME is propagated, otherwise it fails. :::

After deployment, your service is available on your custom domain https://api.yourcompany.com

:::caution To get your custom domain live, you need to get the second DNS CNAME propagated, otherwise it doesn't work. :::

Assign your custom domain before the deployment

If before deploying you know the service names that will be used (see service names), you can assign the url for each service before deploying,

For example suppose you are deploying a docker service named 'my-docker-service' and you want to use it on your custom domain https://api.yourcompany.com.

Before deploying, use

npx warp env base-url add my-docker-service api.yourcompany.com

The command will dump something like that:

Base URL ID 'docker' with hostname 'api.yourcompany.com' added.
Please deploy:
  - a DNS CNAME record under the name 'xxxxx.api.yourcompany.com' with value 'api.yourcompany.com.scaledynamics.link.' before deploying
  - a DNS CNAME record under the name 'api.yourcompany.com' with value 'xxxxx.scaledynamics.site.' when you want your URL live

Now follow the guideline and add those two DNS CNAME records with the value provided in your domain name provider's DNS configuration.

When done, you can deploy your service.

:::caution The deploy can be done only if the first DNS CNAME is propagated, otherwise it fails. :::

After deployment, your service is available on your custom domain https://api.yourcompany.com

:::caution To get your custom domain live, you need to get the second DNS CNAME propagated, otherwise it doesn't work. :::

View service configurations

To get the list of all services, names and associated urls, use the command

npx warp env info

In the example above, the command will dump something like this:

Name: env-name
Base URLs:
  docker: api.yourcompany.com (custom)
DNS Records:
  Type: 'CNAME' Name: 'xxxxx.api.yourcompany.com' Value: 'api.yourcompany.com.scaledynamics.link.'
  Type: 'CNAME' Name: 'api.yourcompany.com' Value: 'xxxxx.scaledynamics.site.'
Deployments: deployment-2022-12-05T17:22:17.692Z