Use ENV variables for services definitions

Issue #17164 resolved
Dmytro Paiareli created an issue

Hello!

I very like pipelines and I want to thank the team for that useful service.

I have a suggestion to use ENV variables for definitions section. I'm developing laravel project and I think that using ENV vars for services credentials would be very convenient.

definitions:
  services:
    mysql:
      image: mysql:8
      environment:
        MYSQL_DATABASE: ${DB_DATABASE}
        MYSQL_USER: ${DB_USERNAME}
        MYSQL_PASSWORD: ${DB_PASSWORD}
        MYSQL_RANDOM_ROOT_PASSWORD: yes

I know that for test env it is not critical, but I think that specifying services credentials in one place would be more convenient.

Thanks!

Comments (1)

  1. Aneita Yang staff

    Hi @dpayareli,

    Thanks for reaching out.

    This is actually possible today - you can use environment variables in your service definitions. Removing the curly brackets in the example that you provided should make this work for you.

    You can check out our documentation for more information. Hope this helps!

  2. Log in to comment