Changed dev to local, since laravel uses local for non-production deployments

This commit is contained in:
Deon George 2021-05-24 15:39:07 +10:00
parent 3868365626
commit 8d34685aaa

12
init
View File

@ -46,7 +46,7 @@ if [ "${role}" = "app" -a -e artisan ]; then
# Only adjust perms if this is an external mountpoint
if [ ${mp} -eq 0 -o -n "${FORCE_PERMS}" ] ; then
if [ -n "${FORCE_PERMS}" -o "${env}" != "dev" -a -z "${SKIP_PERM}" ]; then
if [ -n "${FORCE_PERMS}" -o "${env}" != "local" -a -z "${SKIP_PERM}" ]; then
echo "* Setting Permissions..."
# Make sure our permissions are appropraite
find ${php} -type f -exec chmod 640 {} \;
@ -63,20 +63,20 @@ if [ "${role}" = "app" -a -e artisan ]; then
# See if we need to refresh our dependancies
if [[ -r composer.json && ( -e .composer.refresh || ! -d vendor ) ]]; then
rm -f ${php}/bootstrap/cache/*.php
if [ "${env}" != "dev" ]; then
if [ "${env}" != "local" ]; then
NODEV="--no-dev"
fi
mp=$(mp ${composer})
if [ ${mp} -eq 0 -o -n "${FORCE_PERMS}" ] ; then
[ -n "${FORCE_PERMS}" -o "${env}" != "dev" -a -z "${SKIP_PERM}" ] && chown -R www-data:www-data ${composer}
[ -n "${FORCE_PERMS}" -o "${env}" != "local" -a -z "${SKIP_PERM}" ] && chown -R www-data:www-data ${composer}
[ ! -d ${php}/vendor ] && mkdir -m 750 ${php}/vendor && chown www-data:www-data ${php}/vendor
[ -n "${FORCE_PERMS}" -o "${env}" != "dev" -a -z "${SKIP_PERM}" ] && chmod g+w ${php}
[ -n "${FORCE_PERMS}" -o "${env}" != "local" -a -z "${SKIP_PERM}" ] && chmod g+w ${php}
fi
su www-data -s /bin/sh -c "composer install --optimize-autoloader ${NODEV}" && ( test -e .composer.refresh && rm -f .composer.refresh )
[ -n "${FORCE_PERMS}" -o "${env}" != "dev" -a -z "${SKIP_PERM}" ] && [ ${mp} -eq 0 ] && chmod g-w ${php}
[ -n "${FORCE_PERMS}" -o "${env}" != "local" -a -z "${SKIP_PERM}" ] && [ ${mp} -eq 0 ] && chmod g-w ${php}
fi
if [ -e .lumen ]; then
@ -126,7 +126,7 @@ elif [ "$role" = "queue" -a -e artisan ]; then
fi
QUEUE_CMD=work
if [ "${env}" == "dev" ]; then
if [ "${env}" == "local" ]; then
QUEUE_CMD=listen
fi