Repository for running Symfony 6+ into Docker.
git clone https://github.com/DarkoKlisuric/SymfonyDocker.git
cd docker
docker-compose build
docker-compose up -d
cd application
cp .env.example .env
docker exec -it php bash
cd application
composer install
http://localhost:8080/
Get IP of database container:
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' database
-------------------------------------------------------------------------------------------------
In .env file paste ip of container with user and password from docker-compose:
DATABASE_URL=mysql://user:password@{IP-of-database-container}}:3306/app