1

I'm working on a Docker Swarm (Docker 1.13.0). Multiple environments (aka overlay networks) will be running in this swarm. An environment will be either test, staging or production for a given Drupal site.

We've traditionally tried to keep configurations as similar as possible across test, staging and production. For instance, the hostname to access the MariaDB (which Drupal use) has been drupaldb within any of these environments.

We're now migrating to Docker Swarm, but we realise that service names must be unique. A service name also becomes a hostname. This means we can only use drupaldb once before we run into trouble.

With my current knowledge, we have to use different hostnames for every environment. I can't find a way to set aliases for services in Docker, and maintaining aliases manually seems to defeat the entire purpose of service discovery.

It seems that we've got to use service names such as siteA_drupaldb_test, siteA_drupaldb_staging and siteA_drupaldb_prod. It's cumbersome and means we have to maintain a lot of different configuration files which any given Drupal site boots from.

Is there a way to spin up a service and assign an extra alias og hostname to a service?

0

You must log in to answer this question.

Browse other questions tagged .