@@ -8,141 +8,124 @@ This documentation covers the process for updating the panel portion of Pelican.
88
99## Version Requirements
1010
11- Each version of Pelican Panel also has a corresponding minimum version of Wings that
12- is required for it to run.
11+ Each version of Pelican Panel also has a corresponding minimum version of Wings that is required for it to run.
1312
14- Please see the chart below for how these versions line up. In
15- most cases your base Wings version should match that of your Panel.
13+ Please see the chart below for how these versions line up.
1614
1715| Panel Version | Wings Version | Supported | PHP Version |
1816| :-------------:| :-------------:| :---------:| :-----------:|
1917| 1.x | 1.x | ✅︎ | 8.2/8.3/8.4 |
2018
21- ### Enter Maintenance Mode
19+ ## Updating
2220
23- Whenever you are performing an update you should be sure to place your Panel into maintenance mode. This will prevent
24- users from encountering unexpected errors.
21+ You have two options for updating: use the automatic update script (recommended) or do the update steps manually.
2522
26- ``` sh
27- cd /var/www/pelican
28- php artisan down
29- ```
23+ <Tabs >
24+ <TabItem value = " Update script (recommended)" >
25+ Simply run the command below and the update script will guide you through the process:
3026
31- <Admonition type = " warning" >
32- If you are updating from < 1.0.0-beta13. Please use the below script! This will ensure all the recently deleted files are removed.
33-
34- Note: this script is experimental... IT WILL NOT CREATE A MYSQL DUMP FOR YOUR DATABASE!
35- Note: This script runs all the below commands for you.
36-
37- What the script does, is looks for ` .env ` , and if it exists pulls ` DB_CONNECTION ` to see if you are using mysql/mariadb/sqlite, if sqlite it will copy the database.sqlite to a backup folder
38- along with the env. Once they're copied to the backup folder it will delete everything except the backup folder in the specified install directory.
39-
40- Proceeds to download the latest release, extracts to install directory, Sets some permissions, runs composer install, restores old sqlite database and .env. Runs Filament Optimize, Updates migrations, asks you to input the webserver for file owner (www-data/apache/nginx), restarts the queue, and Voilà! If you have any issues please reach out on discord!
41-
42- If you do not wish to use the script and wish to do it manually, You can delete everything except the ` .env ` and the sqlite database file, if using sqlite. then follow the standard update process below.
43-
44- ``` sh
45- sudo bash -c " $( curl -fsSL https://pelican.dev/updatePanel.sh) "
46- ```
47-
48- </Admonition >
27+ ``` sh
28+ sudo bash -c " $( curl -fsSL https://pelican.dev/updatePanel.sh) "
29+ ```
30+ </TabItem >
31+ <TabItem value = " Manual update" >
32+ ### Enter Maintenance Mode
4933
50- ### Download Update
34+ Whenever you are performing an update you should be sure to place your Panel into maintenance mode. This will prevent
35+ users from encountering unexpected errors.
5136
52- The first step in the update process is to download the new panel files from GitHub. The command below will download
53- the release archive for the most recent version of Pelican, save it in the current directory and will automatically
54- unpack the archive into your current folder.
37+ ``` sh
38+ cd /var/www/pelican
39+ sudo php artisan down
40+ ```
5541
56- ``` sh
57- curl -L https://github.com/pelican-dev/panel/releases/latest/download/panel.tar.gz | sudo tar -xzv
58- ```
42+ ### Download Update
5943
60- Once the archive is downloaded and extracted we need to set the correct permissions on the cache and storage directories to avoid
61- any webserver related errors.
44+ The first step in the update process is to download the new panel files from GitHub. The command below will download
45+ the release archive for the most recent version of Pelican, save it in the current directory and will automatically
46+ unpack the archive into your current folder.
6247
63- ``` sh
64- sudo chmod -R 755 storage/ * bootstrap/cache
65- ```
48+ ``` sh
49+ curl -L https://github.com/pelican-dev/panel/releases/latest/download/panel.tar.gz | sudo tar -xzv
50+ ```
6651
67- ### Update Dependencies
52+ Once the archive is downloaded and extracted we need to set the correct permissions on the cache and storage directories to avoid
53+ any webserver related errors.
6854
69- ``` sh
70- sudo COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev --optimize-autoloader
71- ```
55+ ``` sh
56+ sudo chmod -R 755 storage/ * bootstrap/cache
57+ ```
7258
73- <Admonition type = " info" >
74- Even though composer might tell you that you have outdated dependencies, do ** not** run ` composer update ` !
75- </Admonition >
59+ ### Update Dependencies
7660
77- ### Create storage symlinks
61+ ``` sh
62+ sudo COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev --optimize-autoloader
63+ ```
7864
79- ``` sh
80- php artisan storage:link
81- ```
65+ < Admonition type = " info " >
66+ Even though composer might tell you that you have outdated dependencies, do ** not ** run ` composer update ` !
67+ </ Admonition >
8268
83- ### Clear Compiled Template Cache
69+ ### Create storage symlinks
8470
85- You'll also want to clear the compiled template cache to ensure that new and modified templates show up correctly for
86- users.
71+ ``` sh
72+ sudo php artisan storage:link
73+ ```
8774
88- ``` sh
89- php artisan view:clear
90- php artisan config:clear
91- ```
75+ ## Cache components
9276
93- ## Cache components
77+ ``` sh
78+ sudo php artisan optimize:clear
79+ sudo php artisan optimize
80+ ```
9481
95- To make sure your panel loads faster you'll want to cache filament components.
82+ ### Update Database
9683
97- ``` sh
98- php artisan filament:optimize
99- ```
84+ You'll also need to update your database schema. Running the command below
85+ will update the schema and ensure the default eggs we ship are up to date (and add any new ones we might have). Just
86+ remember, _ never edit core eggs we ship _ ! They will be overwritten by this update process.
10087
101- ### Update Database
88+ ``` sh
89+ sudo php artisan migrate --seed --force
90+ ```
10291
103- You'll also need to update your database schema. Running the command below
104- will update the schema and ensure the default eggs we ship are up to date (and add any new ones we might have). Just
105- remember, _ never edit core eggs we ship_ ! They will be overwritten by this update process.
92+ ### Set Permissions
93+
94+ The last step is to set proper ownership of the files. In most cases this
95+ is ` www-data ` but can vary from system to system &mdash ; sometimes being ` nginx ` , ` caddy ` , ` apache ` , or even ` nobody ` .
96+
97+ <Tabs >
98+ <TabItem value = " NGINX/ Apache/ Caddy" >
99+ ``` sh
100+ sudo chown -R www-data:www-data /var/www/pelican
101+ ```
102+ </TabItem >
103+ <TabItem value = " Rocky Linux NGINX" >
104+ ``` sh
105+ sudo chown -R nginx:nginx /var/www/pelican
106+ ```
107+ </TabItem >
108+ <TabItem value = " Rocky Linux Apache" >
109+ ``` sh
110+ sudo chown -R apache:apache /var/www/pelican
111+ ```
112+ </TabItem >
113+ </Tabs >
114+
115+ ### Restart Queue Workers
116+
117+ After _ every update_ you should restart the queue worker.
106118
107- ``` sh
108- php artisan migrate --seed --force
109- ```
119+ ``` sh
120+ sudo php artisan queue:restart
121+ ```
110122
111- ### Set Permissions
123+ ### Exit Maintenance Mode
112124
113- The last step is to set proper ownership of the files. In most cases this
114- is ` www-data ` but can vary from system to system &mdash ; sometimes being ` nginx ` , ` caddy ` , ` apache ` , or even ` nobody ` .
125+ Now that everything has been updated you need to exit maintenance mode.
115126
116- <Tabs className = " unique-tabs" >
117- <TabItem value = " NGINX/Apache" >
118- ``` sh
119- sudo chown -R www-data:www-data /var/www/pelican
120- ```
121- </TabItem >
122- <TabItem value = " Rocky Linux NGINX" >
123127 ``` sh
124- sudo chown -R nginx:nginx /var/www/pelican
125- ```
126- </TabItem >
127- <TabItem value = " Rocky Linux Apache" >
128- ``` sh
129- sudo chown -R apache:apache /var/www/pelican
128+ sudo php artisan up
130129 ```
131130 </TabItem >
132131</Tabs >
133-
134- ### Restart Queue Workers
135-
136- After _ every update_ you should restart the queue worker.
137-
138- ``` sh
139- php artisan queue:restart
140- ```
141-
142- ### Exit Maintenance Mode
143-
144- Now that everything has been updated you need to exit maintenance mode.
145-
146- ``` sh
147- php artisan up
148- ```
0 commit comments