mirror of
https://github.com/linuxserver/docker-heimdall.git
synced 2025-12-01 04:29:43 +09:00
10
Dockerfile
10
Dockerfile
@@ -21,20 +21,14 @@ RUN \
|
||||
tar && \
|
||||
echo "**** install heimdall ****" && \
|
||||
mkdir -p \
|
||||
/var/www/localhost/heimdall && \
|
||||
/heimdall && \
|
||||
if [ -z ${HEIMDALL_RELEASE+x} ]; then \
|
||||
HEIMDALL_RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/commits/master" \
|
||||
| awk '/sha/{print $4;exit}' FS='[""]'); \
|
||||
fi && \
|
||||
curl -o \
|
||||
/tmp/heimdall.tar.gz -L \
|
||||
/heimdall/heimdall.tar.gz -L \
|
||||
"https://github.com/linuxserver/Heimdall/archive/${HEIMDALL_RELEASE}.tar.gz" && \
|
||||
tar xf \
|
||||
/tmp/heimdall.tar.gz -C \
|
||||
/var/www/localhost/heimdall --strip-components=1 && \
|
||||
echo "**** configure nginx ****" && \
|
||||
echo -e '\n# Heimdall user authorization\nfastcgi_param PHP_AUTH_USER $remote_user;\nfastcgi_param PHP_AUTH_PW $http_authorization;' >> \
|
||||
/etc/nginx/fastcgi_params && \
|
||||
echo "**** cleanup ****" && \
|
||||
rm -rf \
|
||||
/tmp/*
|
||||
|
||||
@@ -21,20 +21,14 @@ RUN \
|
||||
tar && \
|
||||
echo "**** install heimdall ****" && \
|
||||
mkdir -p \
|
||||
/var/www/localhost/heimdall && \
|
||||
/heimdall && \
|
||||
if [ -z ${HEIMDALL_RELEASE+x} ]; then \
|
||||
HEIMDALL_RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/commits/master" \
|
||||
| awk '/sha/{print $4;exit}' FS='[""]'); \
|
||||
| awk '/sha/{print $4;exit}' FS='[""]'); \
|
||||
fi && \
|
||||
curl -o \
|
||||
/tmp/heimdall.tar.gz -L \
|
||||
/heimdall/heimdall.tar.gz -L \
|
||||
"https://github.com/linuxserver/Heimdall/archive/${HEIMDALL_RELEASE}.tar.gz" && \
|
||||
tar xf \
|
||||
/tmp/heimdall.tar.gz -C \
|
||||
/var/www/localhost/heimdall --strip-components=1 && \
|
||||
echo "**** configure nginx ****" && \
|
||||
echo -e '\n# Heimdall user authorization\nfastcgi_param PHP_AUTH_USER $remote_user;\nfastcgi_param PHP_AUTH_PW $http_authorization;' >> \
|
||||
/etc/nginx/fastcgi_params && \
|
||||
echo "**** cleanup ****" && \
|
||||
rm -rf \
|
||||
/tmp/*
|
||||
|
||||
@@ -21,20 +21,14 @@ RUN \
|
||||
tar && \
|
||||
echo "**** install heimdall ****" && \
|
||||
mkdir -p \
|
||||
/var/www/localhost/heimdall && \
|
||||
/heimdall && \
|
||||
if [ -z ${HEIMDALL_RELEASE+x} ]; then \
|
||||
HEIMDALL_RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/commits/master" \
|
||||
| awk '/sha/{print $4;exit}' FS='[""]'); \
|
||||
| awk '/sha/{print $4;exit}' FS='[""]'); \
|
||||
fi && \
|
||||
curl -o \
|
||||
/tmp/heimdall.tar.gz -L \
|
||||
/heimdall/heimdall.tar.gz -L \
|
||||
"https://github.com/linuxserver/Heimdall/archive/${HEIMDALL_RELEASE}.tar.gz" && \
|
||||
tar xf \
|
||||
/tmp/heimdall.tar.gz -C \
|
||||
/var/www/localhost/heimdall --strip-components=1 && \
|
||||
echo "**** configure nginx ****" && \
|
||||
echo -e '\n# Heimdall user authorization\nfastcgi_param PHP_AUTH_USER $remote_user;\nfastcgi_param PHP_AUTH_PW $http_authorization;' >> \
|
||||
/etc/nginx/fastcgi_params && \
|
||||
echo "**** cleanup ****" && \
|
||||
rm -rf \
|
||||
/tmp/*
|
||||
|
||||
@@ -194,6 +194,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
|
||||
|
||||
## Versions
|
||||
|
||||
* **15.07.19:** - Save laravel.log to /config, install heimdall during first start.
|
||||
* **28.06.19:** - Rebasing to alpine 3.10.
|
||||
* **23.03.19:** - Switching to new Base images, shift to arm32v7 tag.
|
||||
* **22.02.19:** - Rebasing to alpine 3.9.
|
||||
|
||||
@@ -52,6 +52,7 @@ app_setup_block: |
|
||||
|
||||
# changelog
|
||||
changelogs:
|
||||
- { date: "15.07.19:", desc: "Save laravel.log to /config, install heimdall during first start." }
|
||||
- { date: "28.06.19:", desc: "Rebasing to alpine 3.10." }
|
||||
- { date: "23.03.19:", desc: "Switching to new Base images, shift to arm32v7 tag." }
|
||||
- { date: "22.02.19:", desc: "Rebasing to alpine 3.9." }
|
||||
|
||||
@@ -2,7 +2,20 @@
|
||||
|
||||
# make our folders
|
||||
mkdir -p \
|
||||
/config/www/{backgrounds,icons,avatars,SupportedApps}
|
||||
/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
|
||||
|
||||
@@ -20,9 +33,15 @@ do
|
||||
[[ ! -L "$i" ]] && ln -s /config/www/"$(basename "$i")" "$i"
|
||||
done
|
||||
|
||||
[[ -e "/var/www/localhost/heimdall/storage/logs/laravel.log" && ! -L "/var/www/localhost/heimdall/storage/logs/laravel.log" ]] \
|
||||
&& rm -rf "/var/www/localhost/heimdall/storage/logs/laravel.log"
|
||||
[[ ! -L "/var/www/localhost/heimdall/storage/logs/laravel.log" ]] && \
|
||||
ln -s "/config/log/heimdall/laravel.log" "/var/www/localhost/heimdall/storage/logs/laravel.log"
|
||||
|
||||
# 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
|
||||
|
||||
9
root/etc/logrotate.d/heimdall
Normal file
9
root/etc/logrotate.d/heimdall
Normal file
@@ -0,0 +1,9 @@
|
||||
/config/log/heimdall/laravel.log {
|
||||
size 5M
|
||||
rotate 5
|
||||
compress
|
||||
nodateext
|
||||
notifempty
|
||||
missingok
|
||||
su abc abc
|
||||
}
|
||||
Reference in New Issue
Block a user