Skip to content

[Symfony Local Web Server] Docker integration - path to the docker-compose.yaml #38259

Closed
@Plopix

Description

@Plopix

I am not sure that the good place, as it is not directly connected to the Symfony framework itself, but I try ;-)

Doc

https://symfony.com/doc/current/setup/symfony_server.html#docker-integration
Document says
When the web server detects that Docker Compose is running for the project, it automatically exposes environment variables according to the exposed port and the name of the docker-compose services.

That's great.

Problem

We don't really have details on the "how", but it does not work if the docker-compose.ya?ml is not at the root folder, correct?
I did few tests and I am pretty confident in that conclusion.

So I wonder if that would be (or if it is) possible to configure something to actually tell the Symfony Local Web Server where is the docker-compose.yaml

Use case

Application structure is this:

- application (a first symfony app)
- bridge (a second symfony app)
- legacy (something else)
- provisioning/dev (docker stuff for local dev)
- provisioning/prod (other things)

Basically we want to disconnect the hosting part and the software part, actually even for simpler projects we default with application and provisioning at the root of the project.

Possible solution

We would need to tell to Symfony Local Web Server that the docker-composer folder is ../provisioning/dev/
Maybe in a config file, or an ENV var?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions