mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-21 12:14:05 +00:00
Improve .dev/php/entrypoint permissions setting
This commit is contained in:
@@ -6,32 +6,39 @@ echo "############################################"
|
|||||||
|
|
||||||
cd /home/invoiceshelf/app
|
cd /home/invoiceshelf/app
|
||||||
|
|
||||||
chmod 775 storage/framework
|
|
||||||
chmod 775 storage/logs
|
|
||||||
chmod 775 bootstrap/cache
|
|
||||||
|
|
||||||
chown -R ${UID}:${GID} /home/invoiceshelf/app
|
|
||||||
|
|
||||||
chmod +x artisan
|
|
||||||
|
|
||||||
|
# Composer build
|
||||||
if [ ! -d vendor ]; then
|
if [ ! -d vendor ]; then
|
||||||
composer install
|
composer install
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Empty sqlite database
|
||||||
if [ ! -f database/database.sqlite ]; then
|
if [ ! -f database/database.sqlite ]; then
|
||||||
cp database/stubs/sqlite.empty.db database/database.sqlite
|
cp database/stubs/sqlite.empty.db database/database.sqlite
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# .env file set up
|
||||||
if [ ! -f .env ]; then
|
if [ ! -f .env ]; then
|
||||||
cp .env.example .env
|
cp .env.example .env
|
||||||
php artisan key:generate --force
|
php artisan key:generate --force
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# NPM build
|
||||||
if [ ! -d node_modules ]; then
|
if [ ! -d node_modules ]; then
|
||||||
npm install
|
npm install
|
||||||
npm run build
|
npm run build
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Storage symlink
|
||||||
php artisan storage:link
|
php artisan storage:link
|
||||||
|
|
||||||
|
# Permissions
|
||||||
|
chmod 775 storage/framework
|
||||||
|
chmod 775 storage/logs
|
||||||
|
chmod 775 bootstrap/cache
|
||||||
|
chown -R ${UID}:${GID} /home/invoiceshelf/app
|
||||||
|
chmod +x artisan
|
||||||
|
|
||||||
|
echo "Entrypoint complete."
|
||||||
|
|
||||||
exec $@
|
exec $@
|
||||||
|
|||||||
Reference in New Issue
Block a user