Description
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!