mirror of
				https://github.com/linuxserver/docker-heimdall.git
				synced 2025-11-01 05:27:38 +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-pdo_mysql \ | ||||||
|     php81-tokenizer \ |     php81-tokenizer \ | ||||||
|     php81-zip && \ |     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 ****" && \ |   echo "**** install heimdall ****" && \ | ||||||
|   mkdir -p \ |   mkdir -p \ | ||||||
|     /heimdall && \ |     /heimdall && \ | ||||||
| @@ -31,8 +36,16 @@ RUN \ | |||||||
|     | awk '/tag_name/{print $4;exit}' FS='[""]'); \ |     | awk '/tag_name/{print $4;exit}' FS='[""]'); \ | ||||||
|   fi && \ |   fi && \ | ||||||
|   curl -o \ |   curl -o \ | ||||||
|     /heimdall/heimdall.tar.gz -L \ |     /tmp/heimdall.tar.gz -L \ | ||||||
|     "https://github.com/linuxserver/Heimdall/archive/${HEIMDALL_RELEASE}.tar.gz" && \ |     "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 ****" && \ |   echo "**** cleanup ****" && \ | ||||||
|   rm -rf \ |   rm -rf \ | ||||||
|     /tmp/* |     /tmp/* | ||||||
|   | |||||||
| @@ -23,6 +23,11 @@ RUN \ | |||||||
|     php81-pdo_mysql \ |     php81-pdo_mysql \ | ||||||
|     php81-tokenizer \ |     php81-tokenizer \ | ||||||
|     php81-zip && \ |     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 ****" && \ |   echo "**** install heimdall ****" && \ | ||||||
|   mkdir -p \ |   mkdir -p \ | ||||||
|     /heimdall && \ |     /heimdall && \ | ||||||
| @@ -31,8 +36,16 @@ RUN \ | |||||||
|     | awk '/tag_name/{print $4;exit}' FS='[""]'); \ |     | awk '/tag_name/{print $4;exit}' FS='[""]'); \ | ||||||
|   fi && \ |   fi && \ | ||||||
|   curl -o \ |   curl -o \ | ||||||
|     /heimdall/heimdall.tar.gz -L \ |     /tmp/heimdall.tar.gz -L \ | ||||||
|     "https://github.com/linuxserver/Heimdall/archive/${HEIMDALL_RELEASE}.tar.gz" && \ |     "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 ****" && \ |   echo "**** cleanup ****" && \ | ||||||
|   rm -rf \ |   rm -rf \ | ||||||
|     /tmp/* |     /tmp/* | ||||||
|   | |||||||
| @@ -23,6 +23,11 @@ RUN \ | |||||||
|     php81-pdo_mysql \ |     php81-pdo_mysql \ | ||||||
|     php81-tokenizer \ |     php81-tokenizer \ | ||||||
|     php81-zip && \ |     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 ****" && \ |   echo "**** install heimdall ****" && \ | ||||||
|   mkdir -p \ |   mkdir -p \ | ||||||
|     /heimdall && \ |     /heimdall && \ | ||||||
| @@ -31,8 +36,16 @@ RUN \ | |||||||
|     | awk '/tag_name/{print $4;exit}' FS='[""]'); \ |     | awk '/tag_name/{print $4;exit}' FS='[""]'); \ | ||||||
|   fi && \ |   fi && \ | ||||||
|   curl -o \ |   curl -o \ | ||||||
|     /heimdall/heimdall.tar.gz -L \ |     /tmp/heimdall.tar.gz -L \ | ||||||
|     "https://github.com/linuxserver/Heimdall/archive/${HEIMDALL_RELEASE}.tar.gz" && \ |     "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 ****" && \ |   echo "**** cleanup ****" && \ | ||||||
|   rm -rf \ |   rm -rf \ | ||||||
|     /tmp/* |     /tmp/* | ||||||
|   | |||||||
| @@ -4,20 +4,8 @@ | |||||||
| # make our folders | # make our folders | ||||||
| mkdir -p \ | mkdir -p \ | ||||||
|     /config/www/{avatars,backgrounds,icons,logs,SupportedApps} \ |     /config/www/{avatars,backgrounds,icons,logs,SupportedApps} \ | ||||||
|     /app/www \ |  | ||||||
|     /config/log/heimdall |     /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 | # create symlinks | ||||||
| symlinks=( | symlinks=( | ||||||
|     /app/www/storage/app/public/avatars |     /app/www/storage/app/public/avatars | ||||||
| @@ -35,21 +23,17 @@ for i in "${symlinks[@]}"; do | |||||||
|     if [[ ! -L "${i}" ]]; then |     if [[ ! -L "${i}" ]]; then | ||||||
|         ln -s /config/www/"$(basename "${i}")" "${i}" |         ln -s /config/www/"$(basename "${i}")" "${i}" | ||||||
|     fi |     fi | ||||||
|  |     lsiown -R abc:abc /config/www/"$(basename "${i}")" | ||||||
| done | done | ||||||
|  |  | ||||||
| # copy searchproviders if not exists and symlink | # copy searchproviders if not exists and symlink | ||||||
| if [[ ! -f /config/www/searchproviders.yaml ]]; then | if [[ ! -f /config/www/searchproviders.yaml ]]; then | ||||||
|     cp /app/www/storage/app/searchproviders.yaml.orig /config/www/searchproviders.yaml |     cp /app/www/storage/app/searchproviders.yaml.orig /config/www/searchproviders.yaml | ||||||
|  |     lsiown -R abc:abc /config/www/searchproviders.yaml | ||||||
| fi | fi | ||||||
| rm -rf /app/www/storage/app/searchproviders.yaml | rm -rf /app/www/storage/app/searchproviders.yaml | ||||||
| ln -s /config/www/searchproviders.yaml /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 | # copy .env if not exists | ||||||
| if [[ ! -f /config/www/.env ]]; then | if [[ ! -f /config/www/.env ]]; then | ||||||
|     install -g abc -o abc /app/www/.env.example /config/www/.env |     install -g abc -o abc /app/www/.env.example /config/www/.env | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user