VPS Installation.
If you plan to use a machine from Digital Ocean / Vultr ETC.
Last updated
If you plan to use a machine from Digital Ocean / Vultr ETC.
Last updated
Before you start. Login into your new webserver/vps using bash, cmd, or Terminal.
Prerequisites: Install the the following.
LAMP Stack: Make sure you have a LAMP (Linux, Apache, MySQL, PHP) server setup. This setup includes: (s for full list)
Linux (Ubuntu or CentOS, for instance)
Apache web server
MySQL 8.0 database server (or MariaDB, depending on your preference)
PHP 8.2 or later (preferably the latest version compatible with Betriver)
Composer and Node.js/NPM installed on your server:
Composer: A dependency manager for PHP, required to install PHP packages.
Node.js and NPM: Node Package Manager, required for frontend assets.\
Detailed Steps:
Set Up Your Web Root:
Point your Apache web server’s DocumentRoot to the public
directory inside your site directory.
Example for Apache configuration for betriver.io site.
(/etc/apache2/sites-available/betriver.io.conf
):
After updating this file, enable the site and restart Apache:
Extract the Application Files:
Upload Betriver-vps.zip
to your /var/www/
directory.
Extract the zip file:
Rename the extracted folder to your site name, for example:
Navigate to the Site Directory:
Change directory to your newly created site folder:
Install PHP Dependencies:
Run Composer to install the necessary PHP packages:
This will create a vendor
directory containing all the required PHP packages.
Set Up Frontend Assets:
Run NPM to build frontend assets:
Configure Environment Variables:
rename the env.file
file to .env
:
Update .env
with your database and other configuration details:
Generate Application Key:
Run the following command to generate a unique application key:
Run Database Migrations and Seeders:
Migrate the database tables and seed initial data:
Set Folder Permissions:
Ensure the necessary permissions for the storage
and bootstrap/cache
directories:
Restart Apache:
Finally, restart Apache to ensure all configurations are correctly applied:
Access the Site:
Open your browser and navigate to your site’s URL (e.g., http://betriver.io
). Your site should now be live!
Clean up and fix a few things.
If you are like me , you most likely use root, so some permission maybe messed up.
Open your browser and navigate to your site’s URL (e.g., http://betriver.io
). Your site should now be live!
Option 1: Using Crontab
Open your crontab file:
Copy
Add this line to run the scheduler every minute:
Copy
Replace /path-to-your-project
with your project path. (Not the public directory)
Option 2: Using System Crontab
Create a new file in /etc/cron.d/
:
Copy
Add the following line:
Copy
Set proper permissions:
Copy
You need to setup supervisor to run and monitor laravel reverb. We include a bash script to get you up and running without having to manually setup everything. make sure you are in your site directory. This will rig and start all the supervisor processes needed to get reverb up and running. correctly
Copy
Update .env
Copy
The app users queues for events for Jobs, Events and Notification. Queue workers are monitored by supervisord. We have created bash script that will configure supervisord to monitor your queues. here's how to run it.
Copy