Skip to content

Instantly share code, notes, and snippets.

@andrewmclagan
Created October 12, 2016 22:04
Show Gist options
  • Save andrewmclagan/8db270b7f0715f3ec897beab22f353e7 to your computer and use it in GitHub Desktop.
Save andrewmclagan/8db270b7f0715f3ec897beab22f353e7 to your computer and use it in GitHub Desktop.
Laravel artisan docker entrypoint script
#!/bin/bash
set -e
cd /var/www
php artisan optimize --force
php artisan config:cache
php artisan route:cache
exec "$@"
@pinguinjkeke
Copy link

It's handy to use composer install --optimize-autoloader and add vendor folder to .dockerignore

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