Skip to content

test and dev environment variables with docker-compose #381

@grambas

Description

@grambas

we can use docker compose environment element to define symfony envs. For example DATABASE_URL.

services:
  php:
    environment:
      DATABASE_URL:  "mysql..."

Using this method all .env files, even .env.test.local file will be overwritten. In that case my tests runs on DATABASE_URL which is defined in docker-compose what is wrong, becouse test env has another database connection. My question is if it is possible to define symfony envs with docker-compsose for both dev and test environment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions