mirror of
https://github.com/linuxserver/docker-heimdall.git
synced 2026-02-27 06:40:28 +09:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8a231a0083 | ||
|
|
b4e6b7a6cf | ||
|
|
b767cf054f |
19
Dockerfile
19
Dockerfile
@@ -1,4 +1,4 @@
|
|||||||
FROM lsiobase/alpine.nginx:3.8
|
FROM lsiobase/alpine.nginx:3.7
|
||||||
|
|
||||||
# set version label
|
# set version label
|
||||||
ARG BUILD_DATE
|
ARG BUILD_DATE
|
||||||
@@ -9,8 +9,8 @@ LABEL maintainer="aptalca"
|
|||||||
# environment settings
|
# environment settings
|
||||||
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2
|
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2
|
||||||
|
|
||||||
|
# install packages
|
||||||
RUN \
|
RUN \
|
||||||
echo "**** install runtime pacakges ****" && \
|
|
||||||
apk add --no-cache \
|
apk add --no-cache \
|
||||||
curl \
|
curl \
|
||||||
php7-ctype \
|
php7-ctype \
|
||||||
@@ -20,17 +20,12 @@ RUN \
|
|||||||
echo "**** install heimdall ****" && \
|
echo "**** install heimdall ****" && \
|
||||||
mkdir -p \
|
mkdir -p \
|
||||||
/var/www/localhost/heimdall && \
|
/var/www/localhost/heimdall && \
|
||||||
HEIM_VER=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" \
|
git clone \
|
||||||
| awk '/tag_name/{print $4;exit}' FS='[""]') && \
|
https://github.com/linuxserver/Heimdall.git \
|
||||||
curl -o \
|
/var/www/localhost/heimdall && \
|
||||||
/tmp/heimdall.tar.gz -L \
|
echo "** cleanup **" && \
|
||||||
"https://github.com/linuxserver/Heimdall/archive/${HEIM_VER}.tar.gz" && \
|
|
||||||
tar xf \
|
|
||||||
/tmp/heimdall.tar.gz -C \
|
|
||||||
/var/www/localhost/heimdall --strip-components=1 && \
|
|
||||||
echo "**** cleanup ****" && \
|
|
||||||
rm -rf \
|
rm -rf \
|
||||||
/tmp/*
|
/tmp/*
|
||||||
|
|
||||||
# add local files
|
# add local files
|
||||||
COPY root/ /
|
COPY root/ /
|
||||||
|
|||||||
@@ -67,10 +67,6 @@ In this instance `PUID=1001` and `PGID=1001`. To find yours use `id user` as bel
|
|||||||
|
|
||||||
Access the web gui at http://SERVERIP:PORT
|
Access the web gui at http://SERVERIP:PORT
|
||||||
|
|
||||||
## Adding password protection
|
|
||||||
|
|
||||||
This image now supports password protection through htpasswd. Run the following command on your host to generate the htpasswd file `docker exec -it heimdall htpasswd -c /config/nginx/.htpasswd <username>`. Replace <username> with a username of your choice and you will be asked to enter a password. New installs will automatically pick it up and implement password protected access. Existing users updating their image can delete their site config at `/config/nginx/site-confs/default` and restart the container after updating the image. A new site config with htpasswd support will be created in its place.
|
|
||||||
|
|
||||||
## Info
|
## Info
|
||||||
|
|
||||||
* To monitor the logs of the container in realtime `docker logs -f heimdall`.
|
* To monitor the logs of the container in realtime `docker logs -f heimdall`.
|
||||||
@@ -86,9 +82,4 @@ This image now supports password protection through htpasswd. Run the following
|
|||||||
|
|
||||||
## Versions
|
## Versions
|
||||||
|
|
||||||
+ **05.09.18:** Rebase to alpine linux 3.8.
|
|
||||||
+ **06.03.18:** Use password protection if htpasswd is set.
|
|
||||||
Existing users can delete their default site config at /config/nginx/site-confs/default
|
|
||||||
and restart the container, a new default site config with htpasswd support will be created in its place
|
|
||||||
|
|
||||||
+ **12.02.18:** Initial Release.
|
+ **12.02.18:** Initial Release.
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
## Version 2018/03/06 - Changelog: https://github.com/linuxserver/docker-heimdall/commits/master/root/defaults/default
|
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80 default_server;
|
listen 80 default_server;
|
||||||
|
|
||||||
@@ -14,21 +12,10 @@ server {
|
|||||||
ssl_certificate_key /config/keys/cert.key;
|
ssl_certificate_key /config/keys/cert.key;
|
||||||
|
|
||||||
client_max_body_size 0;
|
client_max_body_size 0;
|
||||||
|
|
||||||
error_page 599 = @noauth;
|
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
if (!-f /config/nginx/.htpasswd) {
|
try_files $uri $uri/ /index.php?$args;
|
||||||
return 599;
|
}
|
||||||
}
|
|
||||||
auth_basic "Restricted";
|
|
||||||
auth_basic_user_file /config/nginx/.htpasswd;
|
|
||||||
try_files $uri $uri/ /index.php?$args;
|
|
||||||
}
|
|
||||||
|
|
||||||
location @noauth {
|
|
||||||
try_files $uri $uri/ /index.php?$args;
|
|
||||||
}
|
|
||||||
|
|
||||||
location ~ \.php$ {
|
location ~ \.php$ {
|
||||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||||
|
|||||||
@@ -1,10 +1,16 @@
|
|||||||
#!/usr/bin/with-contenv bash
|
#!/usr/bin/with-contenv bash
|
||||||
|
|
||||||
# make our folders
|
# create folders
|
||||||
mkdir -p \
|
mkdir -p \
|
||||||
/config/www/{backgrounds,icons}
|
/config/www/{backgrounds,icons}
|
||||||
|
|
||||||
# create symlinks
|
# update from git repo
|
||||||
|
cd /var/www/localhost/heimdall
|
||||||
|
git pull
|
||||||
|
[[ ! -z "$BRANCH" ]] && \
|
||||||
|
git checkout "$BRANCH"
|
||||||
|
|
||||||
|
# symlink user config
|
||||||
|
|
||||||
symlinks=( \
|
symlinks=( \
|
||||||
/var/www/localhost/heimdall/storage/app/public/backgrounds \
|
/var/www/localhost/heimdall/storage/app/public/backgrounds \
|
||||||
|
|||||||
Reference in New Issue
Block a user