Skip to content

[EN] Local Installation

Lito edited this page Apr 4, 2024 · 3 revisions
  1. Create the MySQL database.

  2. Clone the repository.

git clone https://github.com/eusonlito/GPS-Tracker.git
  1. Copy the .env.example file as .env and fill in the necessary variables.
cp .env.example .env
  1. Install composer dependencies (remember that we always use the PHP 8.2 binary).
./composer install --no-dev --optimize-autoloader --classmap-authoritative --ansi
  1. Generate the application key.
php artisan key:generate
  1. Regenerate the caches.
./composer artisan-cache
  1. Launch the initial migration.
php artisan migrate --path=database/migrations
  1. Launch the seeder.
php artisan db:seed --class=Database\\Seeders\\Database
  1. Fill Timezones GeoJSON.
php artisan timezone:geojson
  1. Configure the cron job for the user related to the project:
* * * * * cd /var/www/tracker.domain.com && install -d storage/logs/artisan/$(date +"\%Y/\%m/\%d") && /usr/bin/php artisan schedule:run >> storage/logs/artisan/$(date +"\%Y/\%m/\%d")/schedule-run.log 2>&1
  1. Create the main user.
php artisan user:create [email protected] --name=Admin --password=StrongPassword2 --enabled --admin
  1. Configure the web server DocumentRoot to /var/www/project/public.

  2. Profit!

Upgrade

Updating the platform can be done in a simple way with the ./composer deploy command executed by the user who manages that project (usually www-data).