浏览代码

Updated self-hosting

Will Browning 1 年之前
父节点
当前提交
50f7ef4556
共有 2 个文件被更改,包括 17 次插入6 次删除
  1. 16 1
      SELF-HOSTING.md
  2. 1 5
      app/Helpers/GitVersionHelper.php

+ 16 - 1
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)
 - [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)
 - [Adding Certification Authority Authorization](#adding-certification-authority-authorization)
 - [Updating](#updating)
 - [Updating](#updating)
+- [Troubleshooting](#troubleshooting)
 
 
 ## Assumptions
 ## Assumptions
 
 
@@ -1356,7 +1357,7 @@ npm install
 npm run production
 npm run production
 
 
 # Run any database migrations
 # Run any database migrations
-php artisan migrate
+php artisan migrate --force
 
 
 # Clear cache
 # Clear cache
 php artisan config:cache
 php artisan config:cache
@@ -1368,6 +1369,20 @@ php artisan event:cache
 php artisan queue:restart
 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
 ## 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.
 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.

+ 1 - 5
app/Helpers/GitVersionHelper.php

@@ -30,11 +30,7 @@ class GitVersionHelper
             return Str::of($response->json('tag_name', 'v0.0.0'))->after('v')->trim();
             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()
     public static function cacheFreshVersion()