- Spin up a new App server, choose PHP 8
- SSH into it and run
sudo -ito become root - Run
pecl install swooleand enable what you need. (I disabled curl as it did not work for me) - Add a new Site to your server and use git to pull in your Laravel project that has Octane installed.
- Point your DNS to your new site
- Enable SSL using Lets Encrypt
- Change your new Sites Nginx settings to (assuing your site is named octane.example.com):
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Used on Ubuntu 18.04 and 20.04 | |
| # Find instructions for other OSes here: https://certbot.eff.org/instructions | |
| # Install Certbot via Snaps | |
| sudo snap install core; sudo snap refresh core | |
| sudo snap install --classic certbot | |
| sudo ln -s /snap/bin/certbot /usr/bin/certbot | |
| # Install DNS CloudFlare plugin | |
| sudo snap set certbot trust-plugin-with-root=ok |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| TIMECUT_ARGUMENTS="--viewport=1920,1080 --fps=60 --pipe-mode" | |
| LAUNCH_ARGUMENTS="--no-sandbox --disable-setuid-sandbox --allow-file-access-from-files" | |
| WORKERS=3 | |
| START_TIME=0 | |
| FILE_TYPE=mp4 | |
| set -e |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| opendb () { | |
| [ ! -f .env ] && { echo "No .env file found."; exit 1; } | |
| DB_CONNECTION=$(grep DB_CONNECTION .env | grep -v -e '^\s*#' | cut -d '=' -f 2-) | |
| DB_HOST=$(grep DB_HOST .env | grep -v -e '^\s*#' | cut -d '=' -f 2-) | |
| DB_PORT=$(grep DB_PORT .env | grep -v -e '^\s*#' | cut -d '=' -f 2-) | |
| DB_DATABASE=$(grep DB_DATABASE .env | grep -v -e '^\s*#' | cut -d '=' -f 2-) | |
| DB_USERNAME=$(grep DB_USERNAME .env | grep -v -e '^\s*#' | cut -d '=' -f 2-) | |
| DB_PASSWORD=$(grep DB_PASSWORD .env | grep -v -e '^\s*#' | cut -d '=' -f 2-) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # how to run this thingy | |
| # create a file on your mac called setup.sh | |
| # run it from terminal with: sh setup.sh | |
| # heavily inspired by https://twitter.com/damcclean | |
| # https://github.com/damcclean/dotfiles/blob/master/install.sh | |
| # faster dock hiding/showing (run in terminal) | |
| # defaults write com.apple.dock autohide-delay -float 0; defaults write com.apple.dock autohide-time-modifier -int 0;killall Dock |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| use PhpCsFixer\Config; | |
| use PhpCsFixer\Finder; | |
| $rules = [ | |
| 'array_indentation' => true, | |
| 'array_syntax' => ['syntax' => 'short'], | |
| 'binary_operator_spaces' => [ | |
| 'default' => 'single_space', |
This issue is noted here: https://deliciousbrains.com/wp-migrate-db-pro/doc/ssl-errors/
Original reference for this fix is from: http://stackoverflow.com/questions/26461966/osx-10-10-curl-post-to-https-url-gives-sslread-error/26538127#26538127
php -i | grep "SSL Version"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static String decrypt(@NotNull String input, @NotNull String key){ | |
| byte[] bytes = Base64.decodeBase64(input); | |
| if(bytes.length < 17) { | |
| return null; | |
| } | |
| byte[] ivBytes = Arrays.copyOfRange(bytes, 0, 16); | |
| byte[] contentBytes = Arrays.copyOfRange(bytes, 16, bytes.length); |
Before proceed, you may want to follow up Send Welcome Email Notification with Event and Listener.
Create new migration script to add activation_token and activated_at column in users table.
php artisan make:migration add_activation_column --table=users
NewerOlder