Laravel Forge

Laravel Forge is a service to provision, host, and deploy PHP applications. GravDept uses Forge for deploying sites via Git to Linode. Works great for Laravel and Statamic.

Server configuration

Meta > Server Metadata

Keep these values updated with Linode.

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 --production

For Statamic

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

# GravDept
gulp --production

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