Installation for Production
Pre-requisite
PHP Extension
PHP >= 8.2
Ctype PHP Extension
cURL PHP Extension
DOM PHP Extension
Fileinfo PHP Extension
Filter PHP Extension
Hash PHP Extension
Mbstring PHP Extension
OpenSSL PHP Extension
PCRE PHP Extension
PDO PHP Extension
Session PHP Extension
Tokenizer PHP Extension
XML PHP Extension
Intl PHP Extension
Email Notification
Create an account in RESEND for email services.
CDN
Create an account in Cloudinary for Image CDN.
Installation
Clone the repository
Copy the
.env.example
to.env
Update the Laravel Reverb Key by providing a unique key and App Key.
Update your Cloudinary
CLOUDINARY_URL
andRESEND_KEY
.Install dependencies
Generate App Key
Run Database Migration and Seeder
Create a user with a permission of an Owner/Administrator
Generate Reverb Key
Now your backend is ready for integration with your frontend.
Supervisor
To install Supervisor on Ubuntu, you may use the following command: sudo apt-get install supervisor
.
Supervisor configuration files are typically stored in the /etc/supervisor/conf.d
directory. Within this directory, you may create any number of configuration files that instruct supervisor how your processes should be monitored.
Starting Supervisor
Once the configuration file has been created, you may update the Supervisor configuration and start the processes using the following commands:
Queues
Let's create a ninshiki-worker-queue.conf
file that starts and monitors queue:work
processes:
Pulse Check
Let's create a ninshiki-worker-pulse.conf
file that starts and monitors pulse:check
processes:
Cron Job
In this step, we'll set up a cron job command on the server. If you're using Ubuntu Server, crontab is likely already installed. Run the command below to add a new entry for the cron job.
Task Scheduler (run every 5 minutes)
Copy this cron script to add a new entry for the cron job. Don't forget to update its path of your app.