- Notifications
You must be signed in to change notification settings - Fork152
This is a complete stack for running Symfony 6 with PHP-FPM 8.2 and MySQL 8 into Docker containers using docker-compose tool.
License
ger86/symfony-docker
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This is a complete stack for running Symfony 6.2 into Docker containers using docker-compose tool.
It is composed by 4 containers:
nginx, acting as the webserver.php, the PHP-FPM container with the 8.2 version of PHP.dbwhich is the MySQL database container with aMySQL 8.0 image.
😀 Clone this repo.
If you are working with Docker Desktop for Mac, ensureyou have enabled
VirtioFSfor your sharing implementation.VirtioFSbrings improved I/O performance for operations on bind mounts. Enabling VirtioFS will automatically enable Virtualization framework.Create the file
./.docker/.env.nginx.localusing./.docker/.env.nginxas template. The value of the variableNGINX_BACKEND_DOMAINis theserver_nameused in NGINX.Go inside folder
./dockerand rundocker compose up -dto start containers.You should work inside the
phpcontainer. This project is configured to work withRemote Container extension for Visual Studio Code, so you could runReopen in containercommand after open the project.Inside the
phpcontainer, runcomposer installto install dependencies from/var/www/symfonyfolder.Use the following value for the DATABASE_URL environment variable:
DATABASE_URL=mysql://app_user:helloworld@db:3306/app_db?serverVersion=8.0.33You could change the name, user and password of the database in theenv file at the root of the project.
I have recorded a Youtube session explaining the different parts of this project. You could see it here:
About
This is a complete stack for running Symfony 6 with PHP-FPM 8.2 and MySQL 8 into Docker containers using docker-compose tool.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.