Name Your Service

The top level of your Config file is a services key whose value is a list of Services.

services:
  service1:
  service2:
  service3:

Service names are arbitrary, but they act as the internal host name for the Service. This is the name other Services in the Preview would use to refer to the Service. As a result, there are a few rules you must observe when naming Services:

  • Service names may only include the characters a-z, 0-9, and -.
  • Service names are limited to 39 characters.

As an example, a set of Services that serve a PHP-based site with a MySQL database and a Redis cache might be:

services:
  apache:
  mysql:
  redis: