This template project includes configured and ready to use PHP 8.0, MySQL 8.0, ClickHouse 21.3, Nginx, Redis and RabbitMQ docker containers and Laravel 9
project files, created by composer create-project laravel/laravel example-app
command. Nothing extra!
To install and run this project follow next steps:
-
Create the .env file:
cp .env.example .env
Set your own
GIT_EMAIL
,GIT_USER
,APP_NAME
in the .env file. You can also specify the project name and description at your composer.json. -
Build containers:
docker-compose build
-
Run the containers and enter the php container:
docker-compose up -d && docker-compose exec php bash
-
Run composer install inside the container:
composer install
-
Run npm install inside the container:
npm install
-
Execute database migrations:
php artisan migrate && php artisan clickhouse:migrate
The RabbitMQ Management panel can be accesed at http://localhost:15672/. The user and password are specified in the .env file. If you want yor queues run automatically, use the docker/php-fpm/supervisor.conf file and configure the command for your queue. Don't forget to set autostart to true in the supervisor.conf file. After making changes in the config to make them take effect execute next commands inside your PHP container:
cp /app/docker/php-fpm/supervisor.conf /etc/supervisor/conf.d/supervisor.conf &&
service supervisor restart