Closed sblondeau closed 1 year ago
What does docker --version
return for you?
Hello Nicolas, It returns 24.0.6
and docker compose version return v2.21.0
Can you paste your compose.yaml
file? Also, do you have any override file? If yes, does it follow the same convention?
Hello Kevin, My compose and compose.override have no modification, they are generated when I start my project
version: '3'
services:
###> doctrine/doctrine-bundle ###
database:
image: postgres:${POSTGRES_VERSION:-15}-alpine
environment:
POSTGRES_DB: ${POSTGRES_DB:-app}
# You should definitely change the password in production
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-!ChangeMe!}
POSTGRES_USER: ${POSTGRES_USER:-app}
volumes:
- database_data:/var/lib/postgresql/data:rw
# You may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!
# - ./docker/db/data:/var/lib/postgresql/data:rw
###< doctrine/doctrine-bundle ###
volumes:
###> doctrine/doctrine-bundle ###
database_data:
###< doctrine/doctrine-bundle ###
and the override
version: '3'
services:
###> doctrine/doctrine-bundle ###
database:
ports:
- "5432"
###< doctrine/doctrine-bundle ###
###> symfony/mailer ###
mailer:
image: schickling/mailcatcher
ports: ["1025", "1080"]
###< symfony/mailer ###
As soon as I rename it in docker-compose.yaml, my postgre container works well :-)
I encountered the same database issue with symfony-cli local dev server. The cause was pretty clear when running symfony var:export --debug
.
ERROR: unable to find a docker-compose.yaml or docker-compose.yml for the current directory
ERROR: unable to find a compose directory for the current directory
Renaming the files fixed the issue.
Ok I think I got it, support for the new compose file convention probably needs to be added somewhere in Symfony CLI.
@dunglas Sometimes like this? https://github.com/symfony-cli/symfony-cli/pull/364
Symfony CLI v5.6.2 has been released with the fix.
Hello,
My issue comes appears after that commit https://github.com/symfony/flex/commit/46bebc3d097d1bb1dce04c5ba83658afd79988f9 where docker.compose.yaml has been renamed in compose.yaml
Since yesterday, when I install a new symfony project with --webapp, and then run a docker compose up, my postgresql container is created BUT when I try to use it (via a make:migration or a d:d:c in example) it crashed with this message
After long search, I have finally found that if I rename the file compose.yaml with former name docker-compose.yaml, it works well. Maybe the problem comes from my docker compose configuration ? Do you have any idea? Many thanks for your help