Skip to content

Latest commit

History

17 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

site.ext

Installation instructions

  1. run composer install
  2. run cp .env.example .env
  3. run php key:generate
  4. run php please make:user
  5. run npm i && npm run dev

Environment file contents

Development

Dump your .env values here with sensitive data removed.

Production

Dump your .env values here with sensitive data removed. The following is a production example that uses full static caching:
APP_NAME="Personal Site"APP_ENV=productionAPP_KEY="base64:HKFtnqeatrzOjatdkuKmo0ekMo/HzV+rpEKEeltY+Wo="APP_DEBUG=falseAPP_URL=DEBUGBAR_ENABLED=falseLOG_CHANNEL=stackBROADCAST_DRIVER=logCACHE_DRIVER=fileQUEUE_CONNECTION=redisSESSION_DRIVER=fileSESSION_LIFETIME=120REDIS_HOST=127.0.0.1REDIS_DATABASE=REDIS_PASSWORD=nullREDIS_PORT=6379MAIL_MAILER=smtpMAIL_HOST=smtp.postmarkapp.comMAIL_PORT=587MAIL_ENCRYPTION=tlsMAIL_USERNAME=MAIL_PASSWORD=MAIL_FROM_ADDRESS=MAIL_FROM_NAME="${APP_NAME}"#IMAGE_MANIPULATION_DRIVER=imagickSTATAMIC_LICENSE_KEY=STATAMIC_THEME=businessSTATAMIC_API_ENABLED=falseSTATAMIC_REVISIONS_ENABLED=falseSTATAMIC_GIT_ENABLED=trueSTATAMIC_GIT_PUSH=trueSTATAMIC_GIT_DISPATCH_DELAY=5STATAMIC_STATIC_CACHING_STRATEGY=fullSAVE_CACHED_IMAGES=falseSTATAMIC_STACHE_WATCHER=falseSTATAMIC_CACHE_TAGS_ENABLED=true#STATAMIC_CUSTOM_CMS_NAME=STATAMIC_CUSTOM_LOGO_OUTSIDE_URL="/visuals/client-logo.svg"#STATAMIC_CUSTOM_LOGO_NAV_URL=#STATAMIC_CUSTOM_FAVICON_URL=#STATAMIC_CUSTOM_CSS_URL=

NGINX config

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;
}

Deploy script Ploi

if [[ {COMMIT_MESSAGE} =~"[BOT]" ]];thenecho"Automatically committed on production. Nothing to deploy."
{DO_NOT_NOTIFY}
# Uncomment the following line when using zero downtime deployments.# {CLEAR_NEW_RELEASE}exit 0
ficd {SITE_DIRECTORY}
git pull origin {BRANCH}
composer install --no-interaction --prefer-dist --optimize-autoloader --no-dev
npm ci
npm run build
{SITE_PHP} artisan cache:clear
{SITE_PHP} artisan config:cache
{SITE_PHP} artisan route:cache
{SITE_PHP} artisan statamic:stache:warm
{SITE_PHP} artisan queue:restart
{SITE_PHP} artisan statamic:search:update --all
{SITE_PHP} artisan statamic:static:clear
{SITE_PHP} artisan statamic:static:warm --queue
{RELOAD_PHP_FPM}
echo"🚀 Application deployed!"

Deploy script Forge

if [[ $FORGE_DEPLOY_MESSAGE=~"[BOT]" ]];thenecho"Automatically committed on production. Nothing to deploy."exit 0
ficd$FORGE_SITE_PATH
git pull origin $FORGE_SITE_BRANCH$FORGE_COMPOSER install --no-interaction --prefer-dist --optimize-autoloader --no-dev
npm ci
npm run build
$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 --queue
( flock -w 10 9 ||exit 1
echo'Restarting FPM...'; sudo -S service $FORGE_PHP_FPM reload ) 9>/tmp/fpmlock

About

No description, website, or topics provided.

Resources

Contributing

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages