Laravel Forge

Laravel Forge is a service to provision, host, and deploy PHP applications. GravDept uses Forge for deploying sites via Git to Digital Ocean. It works great for Laravel and Statamic.

Server configuration

Meta > Server Metadata

Keep these values updated with Digital Ocean.

Site configuration

Apps > Deployment > Edit Deploy Script

For Laravel

cd /home/forge/sub.domain.com
git pull origin master
composer install
php artisan migrate
php artisan db:seed

# GravDept
gulp --silent

echo "" | sudo -S service php7.2-fpm reload

For Statamic

cd /home/forge/sub.domain.com
git pull origin master

# GravDept
gulp --silent

echo "" | sudo -S service php7.2-fpm reload

Nginx configuration

Scroll to the bottom, and click “Edit Files > Edit Nginx Configuration”.

For Laravel

No changes.

For Statamic

location / {
    # GravDept: add this line for Statamic
    rewrite ^/admin.php.*$ /admin.php;
    try_files \$uri \$uri/ /index.php?\$query_string;
}

Reference

Security