Using Docker, we raise the server for development. We use the bunch:
- Nginx
- Php-fpm
- MySql
- Redis
- We open the terminal and go to the root folder of the development environment
- We launch the command:
docker compose up composer
. We wait for the container to stop - We launch the command:
docker compose up composer-update
. We wait for the container to stop
Installation completed
- We open the terminal and go to the root folder of the development environment
- We launch the command:
docker composer up nginx
. We expect the launch of 4 containers (nginx, php, db, redis)
The development environment has been launched
- We open the terminal and go to the root folder of the development environment
- We launch the command:
docker compose stop
. We expect a stop of all containers
The development environment is stopped
- We open the terminal and go to the root folder of the development environment
- We launch the command:
docker compose down
. We expect to remove all containers
The development environment is completed
- It issues an error related to access rights to folders and files.
-
- You need to go to the neglected container php
docker exec -it server-php
- You need to go to the neglected container php
-
- Launch the command:
chmod -R 777 /var/www/html/storage \
&& chmod -R 666 $(find /var/www/html/storage -type f) \
&& chmod -R 777 /var/www/html/bootstrap/cache \
&& chmod -R 666 $(find /var/www/html/bootstrap/cache -type f) \
&& chown -R www-data:www-data /var/www/html/storage \
&& chown -R www-data:www-data /var/www/html/bootstrap/cache
-
- To leave the container indicating the key combination in the terminal:
ctrl+d
or console command:logout
- To leave the container indicating the key combination in the terminal: