This project is my final task in BranderSchool on knowledge PHP, Symphony, Twig, Docker and Composer
In the console, write:
sudo docker compose up -d
*If you have problems starting the MySQL and nginx containers, try:
sudo service nginx stop
sudo service mysql stop
In the same window write:
sudo docker exec -it php-fpm bash
In the opened PHP container, write:
composer install
php bin/console doctrine:database:create
php bin/console doctrine:migrations:migrate
Open a new console window and write:
sudo docker exec -it mysql bash
Then write in the MySQL container:
mysql -uroot -p
In the window that appears, write:
root
While in database, write:
use market_test;
After registration on the store page, add administrator rights to the desired user:
update user set roles = JSON_OBJECT('admin', 'ROLE_ADMIN') where id=(your user number in the user table);
After this, an admin panel tab will appear in the header, accessible only to the administrator, from which you can add categories and products.