Laravel Quick Deploy


sudo apt-get updatesudo apt-get update
sudo apt-get install nginx
sudo apt-get install mysql-server sudo mysql_secure_installation
sudo apt-get install php-fpm php-mysql php-mbstring
sudo nano /etc/php/7.0/fpm/php.inisudo systemctl restart php7.0-fpm
sudo nano /etc/nginx/sites-available/defaultsudo nginx -tsudo systemctl reload nginx
sudo mkdir -p /var/www/foldr
sudo nano /etc/nginx/sites-available/defaultsudo service nginx restart
sudo fallocate -l 1G /swapfilesudo mkswap /swapfilesudo swapon /swapfile
cd ~
curl -sS https://getcomposer.org/installer | php sudo mv composer.phar /usr/local/bin/composer
cd /var mkdir repo && cd repo mkdir site.git && cd site.git git init --bare
cd hooks/ sudo nano post-receive sudo chmod +x post-receive
exit
cd /localfldr git remote add production ssh://root@45.76.191.240/var/repo/site.git git push production master
cd /var/www/foldr/ composer install --no-dev sudo chown -R :www-data /var/www/foldr sudo chmod -R 775 /var/www/foldr/storage sudo chmod -R 775 /var/www/foldr/bootstrap/cache
cp .env.example .env sudo nano .env APP_ENV=production APP_DEBUG=false DB_HOST=localhost php artisan key:generate sudo nano config/app.php 'url'=>'http://yourdomain_or_ip', 'timezobe' => 'Asia/Jakarta',
php artisan config:cache
php artisan migrate
sudo nano /etc/nginx/sites-available/default location / { try_files $uri $uri/ /index.php?$query_string; }sudo systemctl reload nginx

Advertisements