mirror of
https://github.com/linuxserver/docker-heimdall.git
synced 2025-10-26 18:53:40 +09:00
install heimdall during container start
This commit is contained in:
@@ -2,7 +2,18 @@
|
||||
|
||||
# make our folders
|
||||
mkdir -p \
|
||||
/config/www/{backgrounds,icons,avatars,SupportedApps}
|
||||
/config/www/{backgrounds,icons,avatars,SupportedApps} \
|
||||
/var/www/localhost/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
|
||||
|
||||
# create symlinks
|
||||
|
||||
@@ -23,11 +34,13 @@ done
|
||||
# copy .env if not exists
|
||||
[[ ! -f /config/www/.env ]] && \
|
||||
cp /var/www/localhost/heimdall/.env.example /config/www/.env && \
|
||||
echo "Creating app key. This may take a while on slower systems"
|
||||
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
|
||||
|
||||
# permissions
|
||||
echo "Setting permissions"
|
||||
chown -R abc:abc \
|
||||
/config \
|
||||
/var/www/localhost/heimdall
|
||||
|
||||
Reference in New Issue
Block a user