|
1 |
| -# 🐳 Docker + PHP 8.1 + MySQL + Nginx + Symfony 6.1 Boilerplate |
| 1 | +# 🐳 Docker + PHP 8.2 + MySQL + Nginx + Symfony 6.2 Boilerplate |
2 | 2 |
|
3 | 3 | ## Description
|
4 | 4 |
|
5 |
| -This is a complete stack for running Symfony 6.1 into Docker containers using docker-compose tool with [docker-sync library](https://docker-sync.readthedocs.io/en/latest/). |
| 5 | +This is a complete stack for running Symfony 6.2 into Docker containers using docker-compose tool. |
6 | 6 |
|
7 | 7 | It is composed by 4 containers:
|
8 | 8 |
|
9 | 9 | - `nginx`, acting as the webserver.
|
10 | 10 | - `php`, the PHP-FPM container with the 8.0 version of PHP.
|
11 | 11 | - `db` which is the MySQL database container with a **MySQL 8.0** image.
|
12 |
| -- `symfony_docker_app_sync` to sync files using library `docker-sync `. |
13 | 12 |
|
14 | 13 | ## Installation
|
15 | 14 |
|
16 |
| -1. 😀 Clone this rep. |
| 15 | +1. 😀 Clone this repo. |
17 | 16 |
|
18 |
| -2. Create the file `./.docker/.env.nginx.local` using `./.docker/.env.nginx` as template. The value of the variable `NGINX_BACKEND_DOMAIN` is the `server_name` used in NGINX. |
| 17 | +2. If you are working with Docker Desktop for Mac, ensure **you have enabled `VirtioFS` for your sharing implementation**. `VirtioFS` brings improved I/O performance for operations on bind mounts. Enabling VirtioFS will automatically enable Virtualization framework. |
19 | 18 |
|
20 |
| -3. Go inside folder `./docker` and run `docker-sync-stack start` to start containers. |
| 19 | +3. Create the file `./.docker/.env.nginx.local` using `./.docker/.env.nginx` as template. The value of the variable `NGINX_BACKEND_DOMAIN` is the `server_name` used in NGINX. |
21 | 20 |
|
22 |
| -4. You should work inside the `php` container. This project is configured to work with [Remote Container](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension for Visual Studio Code, so you could run `Reopen in container` command after open the project. |
| 21 | +4. Go inside folder `./docker` and run `docker compose up -d` to start containers. |
23 | 22 |
|
24 |
| -5. Inside the `php` container, run `composer install` to install dependencies from `/var/www/symfony` folder. |
| 23 | +5. You should work inside the `php` container. This project is configured to work with [Remote Container](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension for Visual Studio Code, so you could run `Reopen in container` command after open the project. |
25 | 24 |
|
26 |
| -6. Use the following value for the DATABASE_URL environment variable: |
| 25 | +6. Inside the `php` container, run `composer install` to install dependencies from `/var/www/symfony` folder. |
| 26 | + |
| 27 | +7. Use the following value for the DATABASE_URL environment variable: |
27 | 28 |
|
28 | 29 | ```
|
29 | 30 | DATABASE_URL=mysql://app_user:helloworld@db:3306/app_db?serverVersion=8.0.23
|
|
0 commit comments