Multiple databases using alias

Hi,

When I have 2 databases as below,

services:
- name: mysql:latest
  alias: mysql-1
- name: mysql:latest
  alias: mysql-2

What is the host for mysql-1 and the host for mysql-2?

It seems that I have only one host called mysql. If that’s the case, how can I access the 2 different databases?

Any help is appreciated.

1 Like

I’m on the same page. The docs detail the same code you have, but don’t go on further to explain how you’d actually configure each of the services: https://docs.gitlab.com/ce/ci/docker/using_docker_images.html#starting-multiple-services-from-the-same-image.

1 Like