This repository contains the basic configuration to run Symfony applications with MySQL database
- PHP-APACHE container running version 8.2
- MySQL container running version 8.2.0
make buildto build the containersmake startto start the containersmake stopto stop the containersmake restartto restart the containersmake prepareto install dependencies with composer (once the project has been created)make logsto see application logsmake sshto SSH into the application container
Tip
Replace all the occurrences of symfony-app in the project with a more meaningful name.
You can use your IDE's find and replace option to complete this task.
- Build and start the containers:
make start
- SSH into the container:
make ssh
- Create a Symfony project using the CLI:
symfony new --no-git --dir project
- Move all the content in the
projectfolder to the root of the repository:mv project/{*,.*} . && rm -r project/ - Add the content of
.gitignorefile to the root one, it should look like this:.idea .vscode docker-compose.yml ###> symfony/framework-bundle ### /.env.local /.env.local.php /.env.*.local /config/secrets/prod/prod.decrypt.private.php /public/bundles/ /var/ /vendor/ ###< symfony/framework-bundle ### - Once you have installed you Symfony application go to http://localhost:1000