feat: got teh panel working
This commit is contained in:
parent
b13683e40c
commit
de1aea7abd
7 changed files with 294 additions and 28 deletions
|
@ -1,28 +0,0 @@
|
|||
{ pkgs, dir }:
|
||||
|
||||
pkgs.writeShellScriptBin "pelican-install" ''
|
||||
DIR=${dir}
|
||||
|
||||
echo "Installing Pelican panel to $DIR ..."
|
||||
if [ -d $DIR ]; then
|
||||
echo "Directory $DIR already exists, exiting"
|
||||
exit 1
|
||||
fi
|
||||
echo "Creating directory ..."
|
||||
mkdir -p $DIR
|
||||
cd $DIR
|
||||
|
||||
echo "Downloading Pelican panel ..."
|
||||
curl -L https://github.com/pelican-dev/panel/releases/latest/download/panel.tar.gz | tar -xzv
|
||||
echo "Installing Pelican panel using composer ..."
|
||||
yes | composer install --no-dev --optimize-autoloader
|
||||
|
||||
echo "Setting up the environment ..."
|
||||
yes "" | php artisan p:environment:setup
|
||||
|
||||
echo "Setting permissions ..."
|
||||
chmod -R 755 storage/* bootstrap/cache/
|
||||
chown -R nginx:nginx $DIR
|
||||
|
||||
echo "Pelican panel installed successfully"
|
||||
''
|
|
@ -1,46 +0,0 @@
|
|||
{ pkgs, dir }:
|
||||
|
||||
pkgs.writeShellScriptBin "pelican-update" ''
|
||||
DIR=${dir}
|
||||
|
||||
echo "Updateing Pelican panel in $DIR ..."
|
||||
if [ -d $DIR ]; then
|
||||
echo "Directory $DIR found, entering maintenance mode ..."
|
||||
else
|
||||
echo "Directory $DIR does not exist, exiting"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd $DIR
|
||||
php artisan down
|
||||
|
||||
echo "Downloading Pelican panel update ..."
|
||||
curl -L https://github.com/pelican-dev/panel/releases/latest/download/panel.tar.gz | tar -xzv
|
||||
|
||||
echo "Setting permissions ..."
|
||||
chmod -R 755 storage/* bootstrap/cache
|
||||
|
||||
echo "Updating Pelican panel using composer ..."
|
||||
yes | composer install --no-dev --optimize-autoloader
|
||||
|
||||
echo "Clearing compiled template cache ..."
|
||||
php artisan view:clear
|
||||
php artisan config:clear
|
||||
|
||||
echo "Optimizing Pelican panel ..."
|
||||
php artisan filament:optimize
|
||||
|
||||
echo "Updating the database ..."
|
||||
php artisan migrate --seed --force
|
||||
|
||||
echo "Setting permissions ..."
|
||||
chown -R nginx:nginx $DIR
|
||||
|
||||
echo "Restart Pelican queue service ..."
|
||||
systemctl restart pelican-queue.service
|
||||
|
||||
echo "Exiting maintenance mode ..."
|
||||
php artisan up
|
||||
|
||||
echo "Pelican panel updated successfully"
|
||||
''
|
Loading…
Add table
Add a link
Reference in a new issue