mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-26 02:40:43 -06:00
Will speed up Docker start.
This commit is contained in:
parent
78a71fb7c6
commit
9fcbce241e
@ -1,6 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Now in entrypoint.sh for Firefly III"
|
||||
|
||||
# make sure the correct directories exists (suggested by @chrif):
|
||||
echo "Making directories..."
|
||||
mkdir -p $FIREFLY_PATH/storage/app/public
|
||||
mkdir -p $FIREFLY_PATH/storage/build
|
||||
mkdir -p $FIREFLY_PATH/storage/database
|
||||
@ -9,27 +12,37 @@ mkdir -p $FIREFLY_PATH/storage/export
|
||||
mkdir -p $FIREFLY_PATH/storage/framework/cache/data
|
||||
mkdir -p $FIREFLY_PATH/storage/framework/sessions
|
||||
mkdir -p $FIREFLY_PATH/storage/framework/testing
|
||||
mkdir -p $FIREFLY_PATH/storage/framework/views
|
||||
mkdir -p $FIREFLY_PATH/storage/framework/views/v1
|
||||
mkdir -p $FIREFLY_PATH/storage/framework/views/v2
|
||||
mkdir -p $FIREFLY_PATH/storage/logs
|
||||
mkdir -p $FIREFLY_PATH/storage/upload
|
||||
|
||||
|
||||
echo "Touch DB file (if SQLlite)..."
|
||||
if [[ $DB_CONNECTION == "sqlite" ]]
|
||||
then
|
||||
touch $FIREFLY_PATH/storage/database/database.sqlite
|
||||
echo "Touched!"
|
||||
fi
|
||||
|
||||
# make sure we own the volumes:
|
||||
chown -R www-data:www-data -R $FIREFLY_PATH
|
||||
chmod -R 775 $FIREFLY_PATH
|
||||
echo "Run chown on ${FIREFLY_PATH}/storage..."
|
||||
chown -R www-data:www-data -R $FIREFLY_PATH/storage
|
||||
echo "Run chmod on ${FIREFLY_PATH}/storage..."
|
||||
chmod -R 775 $FIREFLY_PATH/storage
|
||||
|
||||
# remove any lingering files that may break upgrades:
|
||||
echo "Remove log file..."
|
||||
rm -f $FIREFLY_PATH/storage/logs/laravel.log
|
||||
|
||||
echo "Map environment variables on .env file..."
|
||||
cat .env.docker | envsubst > .env
|
||||
echo "Dump auto load..."
|
||||
composer dump-autoload
|
||||
echo "Discover packages..."
|
||||
php artisan package:discover
|
||||
|
||||
echo "Run various artisan commands..."
|
||||
php artisan migrate --seed
|
||||
php artisan firefly:upgrade-database
|
||||
php artisan firefly:verify
|
||||
@ -38,4 +51,5 @@ php artisan cache:clear
|
||||
|
||||
php artisan firefly:instructions install
|
||||
|
||||
echo "Go!"
|
||||
exec apache2-foreground
|
Loading…
Reference in New Issue
Block a user