Install Composer 2.2
https://getcomposer.org/download/
Install PHP 8.2
https://www.php.net/downloads.php
Install Laravel 10
https://laravel.com/docs/10.x/installation
Clone the repository
git clone git@github.com:eduayme/RescueApp.git
Create a new .env file inside the project folder with the same contents as .env.example
cp .env.example .env
Install project dependencies
composer install
Generate the application key
php artisan key:generate
Install MySQL 8.0
https://dev.mysql.com/doc/mysql-installation-excerpt/8.0/en/
Create the database aplicatiu_bombers in MySQL
CREATE DATABASE aplicatiu_bombers;
Update MySQL credentials in .env
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=aplicatiu_bombers
DB_USERNAME=mysql_username
DB_PASSWORD=mysql_password
Install PostgreSQL 15
https://www.postgresql.org/download/
Create the database aplicatiu_bombers in PostgreSQL
CREATE DATABASE aplicatiu_bombers;
Update PostgreSQL credentials in .env
DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DATABASE=aplicatiu_bombers
DB_USERNAME=postgresql_username
DB_PASSWORD=postgresql_password
Create a Gmail account
Go to your account security settings
https://myaccount.google.com/security?pli=1#connectedapps
Configure an app password (recommended) or equivalent SMTP method, and update credentials in .env
MAIL_MAILER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=gmail_username
MAIL_PASSWORD=gmail_app_password
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS="noreply@example.com"
MAIL_FROM_NAME="RescueApp"
Run database migrations
php artisan migrate
(Optional) Run seeders if the project has them
php artisan db:seed
Start the application
php artisan serve
Open a browser and go to http://127.0.0.1:8000 or http://localhost:8000
RescueApp is running!
Example installation on the subdomain RescueApp.mysite.com
Install Apache2
https://help.ubuntu.com/lts/serverguide/httpd.html#Installation
Configure DNS "A" records for your subdomain as required by your provider
Configure /etc/apache2/sites-enabled/RescueApp.conf adapting the code to your needs: ServerName, DocumentRoot, SSL parameters, etc. Example:
<VirtualHost *:80>
ServerName RescueApp.mysite.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/Rescue-app/public
<Directory /var/www/html/Rescue-app>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName RescueApp.mysite.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/Rescue-app/public
<Directory /var/www/html/Rescue-app>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/mysite.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/mysite.com/privkey.pem
</VirtualHost>
</IfModule>