Skip to content

Instantly share code, notes, and snippets.

@marcelgruber
Last active March 8, 2019 00:21
Show Gist options
  • Save marcelgruber/f8bf851ffcc1f3a71d78f606574ff5a9 to your computer and use it in GitHub Desktop.
Save marcelgruber/f8bf851ffcc1f3a71d78f606574ff5a9 to your computer and use it in GitHub Desktop.
If you're building a new Laravel application and leveraging Laravel Spark, this guide will be VERY helpful to you.

Laravel Spark Site Setup Checklist

  • Favicon
  • php artisan queue:restart https://medium.com/@taylorotwell/properly-deploying-queues-on-forge-5abe1eac6d1c
  • Configure queue for production (database driver is easiest but has drawbacks) https://laravel.com/docs/5.7/queues (install the migration and set .env driver) + CREATE THE MAIL WORKER IN THE FORGE DASHBOARD
  • DO NOT CACHE THE CONFIG OR THE WORKER WON'T WORK FOR QUEUES
  • Google Analytics (do this before Search Console because Analytics can be used to verify the site)
  • Google Search Console
  • Link Search Console and Google Analytics
  • Think about email verification and how the app should behave if the email is not yet verified
  • Ensure your business is verified in Stripe or else you won't be able to set up live keys / products
  • Backup your final .env files (but not in source control -- somewhere secure)
  • Ensure .env file in PROD is set to 'production' and debug mode is set to false
  • Add handlers in the code to detect if in local dev mode vs production mode so that you can switch between the test and live stripe plan IDs in your SparkServiceProvider.php
  • Set up deployment failure notifications in Forge (you can just hook into Slack)
  • Sign up for MailGun or another similar mail service for your production environments
  • Use MailTrap for local email testing
  • Ensure your corporate billing info is correct in Stripe and in the SparkServiceProvider or any Laravel config files
  • ENHANCED .ENV SCRIPT
  • Ensure the site is mobile friendly
  • Use DigitalOcean for your Forge server (easier backup)
  • Set your spark admins in the config files
  • Add BugSnag error reporting or Rollbar
  • Install a "soft" firewall composer package OR use the built in DigitalOcean one
  • Create a configure a separate server on Forge for your Staging environment
  • Identify any scheduled jobs that may need to run
  • Identify any notifications that should occur
  • Install the Proof plugin for enhanced conversions
  • Disable port 80 (HTTP) and 22 (SSH) in the forge Networking page to disable SSH and non-secure connections ** NOTE that if you disable ssh some functionality in Forge will cease to function
  • Add this to the server block in the NGINX config: add_header Strict-Transport-Security "max-age=31536000; includeSubDomains"; (though it is more preferrable to do this in CloudFlare)

Helpful Links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment