You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creating a new project from the skeleton, there is an error when running docker compose up -d for the first time to make migrations.
Steps to reproduce:
# Create a new project
symfony new symfony_project --upsun
cd symfony_project
# Add bundles relevant to the demo we're producing
symfony composer require doctrine/annotations \
doctrine/doctrine-bundle \
doctrine/doctrine-migrations-bundle \
doctrine/orm nelmio/cors-bundle \
symfony/doctrine-bridge \
symfony/html-sanitizer \
symfony/http-client \
symfony/intl symfony/monolog-bundle \
symfony/security-bundle \
symfony/serializer \
symfony/twig-bundle \
symfony/asset-mapper \
symfony/asset \
symfony/twig-pack
symfony composer require --dev doctrine/doctrine-fixtures-bundle symfony/maker-bundle
# Create a new entity
symfony console make:entity
Then,
$ docker compose up -d
yaml: line 5: did not find expected tag URI
A quick Google search showed this was in the !ChangeMe! value for POSTGRES_PASSWORD generated.
Updating the generated compose.yaml file to include quotes on POSTGRES_PASSWORD fixes this:
services:
###> doctrine/doctrine-bundle ###database:
image: postgres:${POSTGRES_VERSION:-16}-alpineenvironment:
POSTGRES_DB: ${POSTGRES_DB:-app}# You should definitely change the password in productionPOSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-"!ChangeMe!"}POSTGRES_USER: ${POSTGRES_USER:-app}healthcheck:
test: ["CMD", "pg_isready", "-d", "${POSTGRES_DB:-app}", "-U", "${POSTGRES_USER:-app}"]timeout: 5sretries: 5start_period: 60svolumes:
- 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 ###
I believe a recent version of Docker Compose can handle a value like !ChangeMe!. I encountered a similar issue with the $ character, which was resolved after updating Docker Desktop (which updates Docker Compose) to the latest version.
Creating a new project from the skeleton, there is an error when running
docker compose up -d
for the first time to make migrations.Steps to reproduce:
Then,
A quick Google search showed this was in the
!ChangeMe!
value forPOSTGRES_PASSWORD
generated.Updating the generated
compose.yaml
file to include quotes onPOSTGRES_PASSWORD
fixes this:The text was updated successfully, but these errors were encountered: