install heimdall during first run

This commit is contained in:
aptalca
2019-07-15 21:52:26 -04:00
parent 1f097316ec
commit 21e6d52b46
4 changed files with 21 additions and 26 deletions

View File

@@ -3,8 +3,20 @@
# make our folders
mkdir -p \
/config/www/{backgrounds,icons,avatars,SupportedApps} \
/var/www/localhost/heimdall \
/config/log/heimdall
# install heimdall if necessary
[[ -f /heimdall/heimdall.tar.gz ]] && \
echo "New container detected, installing Heimdall" && \
tar xf \
/heimdall/heimdall.tar.gz -C \
/var/www/localhost/heimdall --strip-components=1 && \
echo -e '\n# Heimdall user authorization\nfastcgi_param PHP_AUTH_USER $remote_user;\nfastcgi_param PHP_AUTH_PW $http_authorization;' >> \
/etc/nginx/fastcgi_params && \
rm -rf /heimdall && \
chown -R abc:abc /var/www/localhost/heimdall
# create symlinks
symlinks=( \
@@ -29,6 +41,7 @@ done
# copy .env if not exists
[[ ! -f /config/www/.env ]] && \
cp /var/www/localhost/heimdall/.env.example /config/www/.env && \
echo "generating app key"
php /var/www/localhost/heimdall/artisan key:generate
# set queue driver to database
sed -i 's/QUEUE_DRIVER=sync/QUEUE_DRIVER=database/' /config/www/.env