Skip to content

Docker compose does not take into account .dev.env file #935

@NerijusNoreika

Description

@NerijusNoreika

I've setup .env.dev for custom configuration, but it seems to be ignored - only the confiuration from .env file is used.

For example, I set SERVER_NAME on .env.dev to be different from the one in .env, but docker seems to use only the value from .env.

I thought perhaps I need to explicitly define the APP_ENV environment variable:

  php:
    restart: unless-stopped
    environment:
      APP_ENV: dev

but that does not help.

However when I check with command bin/console env I see correct values, both inside the container and outside of it. So to me it seems, like the compose.yaml file just picks the value from .env and ignores all other environment files?

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