Deployment
Custom Domains

Definition

You can specify that your service should listen on a custom domain:

services:
  web:
    domain: myapp.example.org
    port: 3000

You can also specify multiple domains using this syntax:

services:
  web:
    domain:
      - myapp.example.org
      - "*.example.org"
    port: 3000

Using a custom domain requires a valid SSL certificate for the domains being specified.

If a single certificate does not already exist in the same region as the rack is installed and that matches all the domains you specify for your service, one will be automatically created. The DNS owner will receive a validation email with a link that needs to be clicked for this process to complete. This will happen the first time you deploy your service with your configuration

You can pre-generate your SSL certificate ahead of deploy time if you wish.

Dynamic Configuration

You can use environment interpolation so that you don’t have to hardcode the hostname in your convox.yml:

services:
  web:
    domain: ${HOST}
    port: 3000

Configuring DNS

Run convox rack and find the Router value. Configure your custom domain as a CNAME to this domain.

Example

Name docs.convox.com
Type CNAME
Value produ-Route-1ABCDEFGHIJK-01234569.us-east-1.elb.amazonaws.com
TTL 60

To set up DNS for a root domain you should use the an Alias type with Route 53 or the equivalent with your DNS provider.