Move your app from one server to other without downtime (for reading)
Updated: 8th September 2024Tags: ubuntu laravel
If you changed superviser config, or add new program to it, you need to restart it.
sudo supervisorctl stop all
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl start "laravel-worker:*"
For example we have our folder in /etc/nginx/sites-available/example.com
And to make virtual symlink folder here /etc/nginx/sites-enabled
we run this
sudo ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/
ls -Slh
-S will sort files by size
-l long listing
-h will make the output human-readable
-r will reverse the output
Edit file ~/.bash_aliases
nano ~/.bash_aliases
For example I make alias a
. So when I press a
it will produce php artisan tinker
Here file ~/.bash_aliases
alias a='php artisan tinker'
Load aliases immediately
source ~/.bash_aliases
ps aux --sort=-%mem | awk 'NR<=800{print $0}'
ps -eo pid,lstart,cmd
To run some command in background, so you can close terminal, type the following:
nohup command-with-options &
After installing laravel you MUST change some folder permissions.
sudo chmod 755 -R laravel_app
sudo chmod -R o+w laravel_app/storage
sudo chmod -R o+w laravel_app/bootstrap/cache