Unlock this challenge:
In order for Doctrine to talk to the database, we need to configure the DATABASE_URL environment variable. But... we never modified this in .env. Why don't we need to change the value there?
DATABASE_URL
.env
The DATABASE_URL value in .env already matches the connection configuration needed for our Docker-based Postgres database.
We haven't modified DATABASE_URL yet, but we will need to before talking to the database.
The symfony binary detects that we're running a database container via docker-compose and automatically exposes a real DATABASE_URL environment variable that points to that database.
symfony
database
docker-compose