diff --git a/.gitignore b/.gitignore
index 71ab168..1851e34 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,6 +5,7 @@
/public/*/videos
/public/*/audio
/storage/*.key
+/backup
/vendor
.phpunit.result.cache
Homestead.json
diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php
index c3a692a..a536563 100644
--- a/app/Console/Kernel.php
+++ b/app/Console/Kernel.php
@@ -30,7 +30,7 @@ class Kernel extends ConsoleKernel
});
$schedule->command('digest:send --fortnightly')
- ->twiceMonthly(1,16,'13:00')
+ ->twiceMonthly(1, 16, '13:00')
->onFailure(function () {
Log::error("Fortnightly email digest send failed");
});
diff --git a/app/Http/Controllers/TrackerController.php b/app/Http/Controllers/TrackerController.php
index 217db2c..3e0e5d1 100644
--- a/app/Http/Controllers/TrackerController.php
+++ b/app/Http/Controllers/TrackerController.php
@@ -49,7 +49,8 @@ class TrackerController extends Controller
return view(
'error',
[
- 'message' => "App timed out whilst downloading trip data from Wayward's servers. They may be down currently."
+ 'message' => "App timed out whilst downloading trip data" .
+ " from Wayward's servers. They may be down currently."
]
);
}
@@ -145,7 +146,7 @@ class TrackerController extends Controller
// Otherwise, download the trip data from the Wayward API.
if ($forceDownload) {
Log::debug("Forcing download for '{$tripFileName}'.");
- Storage::disk('local')->delete($tripFileName);
+ Storage::disk('local')->delete($tripFileName);
} else {
Log::debug("No cached trip file found for '{$tripFileName}'.");
}
@@ -230,9 +231,9 @@ class TrackerController extends Controller
$dlng = (($result & 1) ? ~($result >> 1) : ($result >> 1));
$lng += $dlng;
- array_push($points, (object)[
+ array_push($points, (object)[
'id' => $id++,
- 'latitude' => $lat/100000,
+ 'latitude' => $lat/100000,
'longitude' => $lng/100000
]);
}
diff --git a/package.json b/package.json
index d92b69e..513dbcc 100644
--- a/package.json
+++ b/package.json
@@ -2,8 +2,12 @@
"private": true,
"scripts": {
"dev": "vite",
- "build": "vite build && rsync --delete -rP app artisan bootstrap composer.* config database lang public resources routes storage tests vendor ovhvps:~/track",
- "sync": "rsync -rP ./public/ ovhvps:~/track/public",
+ "build": "vite build",
+ "deploy": "rsync --delete -rP app artisan bootstrap composer.* config database lang resources routes storage tests ovhvps:~/track",
+ "deploy:public": "rsync --delete -rP public ovhvps:~/track",
+ "deploy:dependencies": "rsync --delete -rP vendor ovhvps:~/track",
+ "deploy:full": "npm run deploy && npm run deploy:public && npm run deploy:dependencies && npm run deploy:finish",
+ "deploy:finish": "ssh ovhvps 'cd track && docker compose down && docker system prune -f && docker compose up -d --build'",
"lint": "npm run lint:php; npm run lint:css",
"lint:fix": "npm run lint:php:fix; npm run lint:css:fix",
"lint:php": "./vendor/bin/phpcs",
diff --git a/resources/views/partials/head.blade.php b/resources/views/partials/head.blade.php
index ed889c7..b1313c0 100644
--- a/resources/views/partials/head.blade.php
+++ b/resources/views/partials/head.blade.php
@@ -18,6 +18,8 @@
+
+
@vite(['resources/css/app.css', 'resources/js/app.js'])
diff --git a/resources/views/tracker.blade.php b/resources/views/tracker.blade.php
index 54086a9..ce9a09a 100644
--- a/resources/views/tracker.blade.php
+++ b/resources/views/tracker.blade.php
@@ -16,9 +16,9 @@