This is the laravel server of devcore app (backend with graphql api (https://lighthouse-php.com/)).
To run this project you must clone this project and configure on your machine.
For convenience, the project contains a full-featured docker-compose project.
After the project it's cloned, please copy the .env.example file and put your configuration params (when applicable)
Your production server must satisfy the following requirements:
- nginx
- php7.3 (with all of the laravel requirements https://laravel.com/docs/7.x/installation)
- mysql
- beanstalkd (enabled as a service to process the message queue)
- redis (cache server)
- supervisor (to run the websockets and workers as a service)
If you want to install this on your production server, please take the file ./docker/nginx/conf.d/app.conf
as example of how to configure your web server.
-
If you are using docker:
./dartisan app:install
-
If you are NOT using docker:
./artisan app:install
-
`php artisan app:install --seed Installs the application and seeds master user with the following credentials: user: [email protected] pw: rockrockrock
- you can add
--seed
option to seed the database with dummyt data (very useful on dev)
The app uses a deferer queue workers and websockets:
To run the queue: artisan queue:work
To run the websockets artisan websockets:serve
You should install supervisor on your production server to make them work
The app needs a cronjob to make the projects schedule work, you should put this on your crontab file:
* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1
If you want receive an email every time that the cron finsih a job, put your email addres in the .env file
After every change on the code, you should run the following command:
artisan app:cache:clean
artisan app:cache:clean
Please keep in mind, that if you are running supervisor, then you need to restart the processes to keep them sycronized!
php artisan serve php artisan serve --host 192.168.10.12 --port 8000
php -d memory_limit=-1 composer.phar update php -d memory_limit=-1 composer.phar require doctrine/dbal
php artisan make:notification ProjectNextStage
php artisan queue:work