- run
composer install
- run
php please make:user
- run
npm i
&&npm run watch
(ornpm run dev
)
Dump your .env values here with sensitive data removed.
Dump your .env values here with sensitive data removed.
Add the following to your NGINX config inside the server block enable static resource caching:
expires $expires;
And this outside the server block:
map $sent_http_content_type $expires {
default off;
text/css max;
~image/ max;
application/javascript max;
application/octet-stream max;
}
if [[ {COMMIT_MESSAGE} =~ "[BOT]" ]]; then
echo "Automatically committed on production. Nothing to deploy."
{DO_NOT_NOTIFY}
# Uncomment the following line when using zero downtime deployments.
# {CLEAR_NEW_RELEASE}
exit 0
fi
cd {SITE_DIRECTORY}
git pull origin main
composer install --no-interaction --prefer-dist --optimize-autoloader
npm ci
npm run production
php{SITE_PHP_VERSION} artisan cache:clear
php{SITE_PHP_VERSION} artisan config:cache
php{SITE_PHP_VERSION} artisan route:cache
php{SITE_PHP_VERSION} artisan statamic:stache:warm
php{SITE_PHP_VERSION} artisan queue:restart
php{SITE_PHP_VERSION} artisan statamic:search:update --all
php{SITE_PHP_VERSION} artisan statamic:static:clear
php{SITE_PHP_VERSION} artisan statamic:static:warm
php{SITE_PHP_VERSION} artisan statamic:assets:generate-presets --queue
{RELOAD_PHP_FPM}
echo "๐ Application deployed!"
if [[ $FORGE_DEPLOY_MESSAGE =~ "[BOT]" ]]; then
echo "Automatically committed on production. Nothing to deploy."
exit 0
fi
cd $FORGE_SITE_PATH
git pull origin main
$FORGE_COMPOSER install --no-interaction --prefer-dist --optimize-autoloader
npm ci
npm run production
$FORGE_PHP artisan cache:clear
$FORGE_PHP artisan config:cache
$FORGE_PHP artisan route:cache
$FORGE_PHP artisan statamic:stache:warm
$FORGE_PHP artisan queue:restart
$FORGE_PHP artisan statamic:search:update --all
$FORGE_PHP artisan statamic:static:clear
$FORGE_PHP artisan statamic:static:warm
$FORGE_PHP artisan statamic:assets:generate-presets --queue
( flock -w 10 9 || exit 1
echo 'Restarting FPM...'; sudo -S service $FORGE_PHP_FPM reload ) 9>/tmp/fpmlock