mirror of
https://github.com/SrIzan10/starters.git
synced 2026-05-01 11:05:16 +00:00
30 lines
502 B
Bash
30 lines
502 B
Bash
#!/usr/bin/env bash
|
|
|
|
if [ ! -z "$WWWUSER" ]; then
|
|
usermod -u $WWWUSER sail
|
|
fi
|
|
|
|
if [ ! -d /.composer ]; then
|
|
mkdir /.composer
|
|
fi
|
|
|
|
npm install
|
|
composer install
|
|
php artisan migrate
|
|
chmod -R ugo+rw /.composer
|
|
|
|
if [ ! -z "$PORT" ]; then
|
|
sed -i -e "s/--port=80/--port=$PORT/g" /etc/supervisor/conf.d/supervisord.conf
|
|
fi
|
|
|
|
cat .env | grep -q APP_KEY=base64
|
|
if [ ! "$?" -eq 0 ]; then
|
|
php artisan key:generate
|
|
fi
|
|
|
|
if [ $# -gt 0 ];then
|
|
exec gosu $WWWUSER "$@"
|
|
else
|
|
/usr/bin/supervisord
|
|
fi
|