diff --git a/SELF-HOSTING.md b/SELF-HOSTING.md index 37646ac..009b003 100644 --- a/SELF-HOSTING.md +++ b/SELF-HOSTING.md @@ -19,6 +19,7 @@ - [Enabling DANE by implementing DNSSEC and adding a TLSA record](#enabling-dane-by-implementing-dnssec-and-adding-a-tlsa-record) - [Adding Certification Authority Authorization](#adding-certification-authority-authorization) - [Updating](#updating) +- [Troubleshooting](#troubleshooting) ## Assumptions @@ -1356,7 +1357,7 @@ npm install npm run production # Run any database migrations -php artisan migrate +php artisan migrate --force # Clear cache php artisan config:cache @@ -1368,6 +1369,20 @@ php artisan event:cache php artisan queue:restart ``` +## Troubleshooting + +If you run into any problems then please check the following logs which should provide more information: + +- `/var/www/anonaddy/storage/logs/laravel*.log` - Web application error logs (any errors relating to issues with the web application) +- `/var/log/mail.log` - Postfix mail logs (details of received and sent emails) +- `/var/log/mail.err` - Postfix errors (errors relating to Postfix configuration) +- `/var/log/php8.2-fpm.log` - PHP logs (logs relating to PHP FastCGI Process Manager) +- `/var/log/nginx/access.log` - Nginx access logs (log of client requests) +- `/var/log/nginx/error.log` - Nginx error logs (log of any server or request errors) +- `/var/log/supervisor/*.log` - Supervisor logs (log of any web application queue issues) + +If a queued job (e.g. forwarding an email) fails, it is stored in the `failed_jobs` table in the database and can be [retried](https://laravel.com/docs/11.x/queues#retrying-failed-jobs). + ## Credits A big thank you to Xiao Guoan over at [linuxbabe.com](https://www.linuxbabe.com/) for all of his amazing articles. I highly recommend you subscribe to his newsletter. diff --git a/app/Helpers/GitVersionHelper.php b/app/Helpers/GitVersionHelper.php index 05715a3..6a777f6 100644 --- a/app/Helpers/GitVersionHelper.php +++ b/app/Helpers/GitVersionHelper.php @@ -30,11 +30,7 @@ class GitVersionHelper return Str::of($response->json('tag_name', 'v0.0.0'))->after('v')->trim(); }); - if (version_compare($latestVersion, $currentVersion, '>')) { - return true; - } - - return false; + return version_compare($latestVersion, $currentVersion, '>'); } public static function cacheFreshVersion()