mirror of
https://github.com/invoiceninja/dockerfiles.git
synced 2025-12-31 19:47:25 +01:00
27 lines
674 B
Bash
Executable File
27 lines
674 B
Bash
Executable File
#!/bin/sh
|
|
set -e
|
|
|
|
# Create directories if they don't exist
|
|
mkdir -p \
|
|
/var/www/html/storage/app/public \
|
|
/var/www/html/storage/framework/cache \
|
|
/var/www/html/storage/framework/sessions \
|
|
/var/www/html/storage/framework/views \
|
|
/var/www/html/storage/logs \
|
|
/var/www/html/public/uploads
|
|
|
|
# Set directory permissions without changing ownership
|
|
chmod -R 775 \
|
|
/var/www/html/storage \
|
|
/var/www/html/bootstrap/cache \
|
|
/var/www/html/public/uploads
|
|
|
|
# Clear and cache config in production
|
|
if [ "$APP_ENV" = "production" ]; then
|
|
php artisan config:cache
|
|
php artisan route:cache
|
|
php artisan view:cache
|
|
fi
|
|
|
|
# Start supervisord
|
|
exec "$@" |