mirror of
https://github.com/linuxserver/docker-heimdall.git
synced 2025-10-26 18:53:40 +09:00
Move install back to Dockerfile
This commit is contained in:
15
Dockerfile
15
Dockerfile
@@ -23,6 +23,11 @@ RUN \
|
||||
php81-pdo_mysql \
|
||||
php81-tokenizer \
|
||||
php81-zip && \
|
||||
echo "**** configure nginx ****" && \
|
||||
echo 'fastcgi_param PHP_AUTH_USER $remote_user; # Heimdall user authorization' >> \
|
||||
/etc/nginx/fastcgi_params && \
|
||||
echo 'fastcgi_param PHP_AUTH_PW $http_authorization; # Heimdall user authorization' >> \
|
||||
/etc/nginx/fastcgi_params && \
|
||||
echo "**** install heimdall ****" && \
|
||||
mkdir -p \
|
||||
/heimdall && \
|
||||
@@ -31,8 +36,16 @@ RUN \
|
||||
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
|
||||
fi && \
|
||||
curl -o \
|
||||
/heimdall/heimdall.tar.gz -L \
|
||||
/tmp/heimdall.tar.gz -L \
|
||||
"https://github.com/linuxserver/Heimdall/archive/${HEIMDALL_RELEASE}.tar.gz" && \
|
||||
mkdir -p \
|
||||
/app/www && \
|
||||
tar xf \
|
||||
/tmp/heimdall.tar.gz -C \
|
||||
/app/www --strip-components=1 && \
|
||||
cp /app/www/storage/app/searchproviders.yaml /app/www/storage/app/searchproviders.yaml.orig && \
|
||||
chown -R abc:abc \
|
||||
/app/www && \
|
||||
echo "**** cleanup ****" && \
|
||||
rm -rf \
|
||||
/tmp/*
|
||||
|
||||
@@ -23,6 +23,11 @@ RUN \
|
||||
php81-pdo_mysql \
|
||||
php81-tokenizer \
|
||||
php81-zip && \
|
||||
echo "**** configure nginx ****" && \
|
||||
echo 'fastcgi_param PHP_AUTH_USER $remote_user; # Heimdall user authorization' >> \
|
||||
/etc/nginx/fastcgi_params && \
|
||||
echo 'fastcgi_param PHP_AUTH_PW $http_authorization; # Heimdall user authorization' >> \
|
||||
/etc/nginx/fastcgi_params && \
|
||||
echo "**** install heimdall ****" && \
|
||||
mkdir -p \
|
||||
/heimdall && \
|
||||
@@ -31,8 +36,16 @@ RUN \
|
||||
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
|
||||
fi && \
|
||||
curl -o \
|
||||
/heimdall/heimdall.tar.gz -L \
|
||||
/tmp/heimdall.tar.gz -L \
|
||||
"https://github.com/linuxserver/Heimdall/archive/${HEIMDALL_RELEASE}.tar.gz" && \
|
||||
mkdir -p \
|
||||
/app/www && \
|
||||
tar xf \
|
||||
/tmp/heimdall.tar.gz -C \
|
||||
/app/www --strip-components=1 && \
|
||||
cp /app/www/storage/app/searchproviders.yaml /app/www/storage/app/searchproviders.yaml.orig && \
|
||||
chown -R abc:abc \
|
||||
/app/www && \
|
||||
echo "**** cleanup ****" && \
|
||||
rm -rf \
|
||||
/tmp/*
|
||||
|
||||
@@ -23,6 +23,11 @@ RUN \
|
||||
php81-pdo_mysql \
|
||||
php81-tokenizer \
|
||||
php81-zip && \
|
||||
echo "**** configure nginx ****" && \
|
||||
echo 'fastcgi_param PHP_AUTH_USER $remote_user; # Heimdall user authorization' >> \
|
||||
/etc/nginx/fastcgi_params && \
|
||||
echo 'fastcgi_param PHP_AUTH_PW $http_authorization; # Heimdall user authorization' >> \
|
||||
/etc/nginx/fastcgi_params && \
|
||||
echo "**** install heimdall ****" && \
|
||||
mkdir -p \
|
||||
/heimdall && \
|
||||
@@ -31,8 +36,16 @@ RUN \
|
||||
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
|
||||
fi && \
|
||||
curl -o \
|
||||
/heimdall/heimdall.tar.gz -L \
|
||||
/tmp/heimdall.tar.gz -L \
|
||||
"https://github.com/linuxserver/Heimdall/archive/${HEIMDALL_RELEASE}.tar.gz" && \
|
||||
mkdir -p \
|
||||
/app/www && \
|
||||
tar xf \
|
||||
/tmp/heimdall.tar.gz -C \
|
||||
/app/www --strip-components=1 && \
|
||||
cp /app/www/storage/app/searchproviders.yaml /app/www/storage/app/searchproviders.yaml.orig && \
|
||||
chown -R abc:abc \
|
||||
/app/www && \
|
||||
echo "**** cleanup ****" && \
|
||||
rm -rf \
|
||||
/tmp/*
|
||||
|
||||
@@ -4,20 +4,8 @@
|
||||
# make our folders
|
||||
mkdir -p \
|
||||
/config/www/{avatars,backgrounds,icons,logs,SupportedApps} \
|
||||
/app/www \
|
||||
/config/log/heimdall
|
||||
|
||||
# install heimdall if necessary
|
||||
if [[ -f /heimdall/heimdall.tar.gz ]]; then
|
||||
echo "New container detected, installing Heimdall"
|
||||
tar xf \
|
||||
/heimdall/heimdall.tar.gz -C \
|
||||
/app/www --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
|
||||
cp /app/www/storage/app/searchproviders.yaml /app/www/storage/app/searchproviders.yaml.orig
|
||||
fi
|
||||
|
||||
# create symlinks
|
||||
symlinks=(
|
||||
/app/www/storage/app/public/avatars
|
||||
@@ -35,21 +23,17 @@ for i in "${symlinks[@]}"; do
|
||||
if [[ ! -L "${i}" ]]; then
|
||||
ln -s /config/www/"$(basename "${i}")" "${i}"
|
||||
fi
|
||||
lsiown -R abc:abc /config/www/"$(basename "${i}")"
|
||||
done
|
||||
|
||||
# copy searchproviders if not exists and symlink
|
||||
if [[ ! -f /config/www/searchproviders.yaml ]]; then
|
||||
cp /app/www/storage/app/searchproviders.yaml.orig /config/www/searchproviders.yaml
|
||||
lsiown -R abc:abc /config/www/searchproviders.yaml
|
||||
fi
|
||||
rm -rf /app/www/storage/app/searchproviders.yaml
|
||||
ln -s /config/www/searchproviders.yaml /app/www/storage/app/searchproviders.yaml
|
||||
|
||||
# tidy up install files & set permissions
|
||||
if [[ -f /heimdall/heimdall.tar.gz ]]; then
|
||||
rm -rf /heimdall
|
||||
lsiown -R abc:abc /config
|
||||
fi
|
||||
|
||||
# copy .env if not exists
|
||||
if [[ ! -f /config/www/.env ]]; then
|
||||
install -g abc -o abc /app/www/.env.example /config/www/.env
|
||||
|
||||
Reference in New Issue
Block a user