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.net"
    port: 3000

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

If a certificate does not already exist in your account that matches the domains you specify, 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.

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.