Skip to content

Instantly share code, notes, and snippets.

@rap2hpoutre
rap2hpoutre / laravel-forge-deploy.sh
Last active Mar 15, 2021
Laravel Forge deploy script without downtime
View laravel-forge-deploy.sh
# stop script on error signal
set -e
# remove old deployment folders
if [ -d "/home/forge/deploy" ]; then
rm -R /home/forge/deploy
fi
if [ -d "/home/forge/backup" ]; then
rm -R /home/forge/backup
fi
@samhernandez
samhernandez / mysqlsync
Last active Mar 4, 2021
Sync remote mysql database to local over ssh
View mysqlsync
#!/bin/bash
# This script assumes you have ssh access to a remote server
# Both databases are backed up to sql files in the same directory
# this script is executed from.
# Usage:
# 1. Make sure this file is executable with `chmod +x mysqlsync`
# 2. Set the credentials for the variables at the top
# (Remember, no spaces around the '=' sign)
# 3. Run it from a directory where you'd like the backup files to go: