Compare commits

...

8 Commits
30 ... 71

Author SHA1 Message Date
sparklyballs
507bc638db Merge pull request #8 from linuxserver/rebase_alpine_3.8
rebase to alpine 3.8
2018-09-05 19:11:31 +01:00
sparklyballs
c40e021452 rebase to alpine 3.8 2018-09-05 11:00:38 +01:00
sparklyballs
46e95f4da6 rebase to alpine 3.8 2018-09-05 10:56:07 +01:00
aptalca
9b63642fed Merge pull request #6 from linuxserver/password
Password protection
2018-03-07 17:57:15 -05:00
aptalca
614bba2960 fix typo 2018-03-06 13:48:12 -05:00
aptalca
f084b90282 fix if statement logic 2018-03-06 13:44:17 -05:00
aptalca
bce88664bf Update README.md 2018-03-06 13:11:03 -05:00
aptalca
1bc1af427b Use htpasswd if exists 2018-03-06 13:01:22 -05:00
4 changed files with 34 additions and 11 deletions

View File

@@ -1,4 +1,4 @@
FROM lsiobase/alpine.nginx:3.7
FROM lsiobase/alpine.nginx:3.8
# set version label
ARG BUILD_DATE
@@ -9,8 +9,8 @@ LABEL maintainer="aptalca"
# environment settings
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2
# install packages
RUN \
echo "**** install runtime pacakges ****" && \
apk add --no-cache \
curl \
php7-ctype \
@@ -18,18 +18,19 @@ RUN \
php7-tokenizer \
tar && \
echo "**** install heimdall ****" && \
HEIM_VER="$(curl -sX GET https://api.github.com/repos/linuxserver/Heimdall/releases/latest | grep 'tag_name' | cut -d\" -f4)" && \
mkdir -p \
/var/www/localhost/heimdall && \
HEIM_VER=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]') && \
curl -o \
/tmp/heimdall.tar.gz -L \
"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 **" && \
echo "**** cleanup ****" && \
rm -rf \
/tmp/*
/tmp/*
# add local files
COPY root/ /

View File

@@ -67,6 +67,10 @@ In this instance `PUID=1001` and `PGID=1001`. To find yours use `id user` as bel
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
* To monitor the logs of the container in realtime `docker logs -f heimdall`.
@@ -82,4 +86,9 @@ Access the web gui at http://SERVERIP:PORT
## 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.

View File

@@ -1,3 +1,5 @@
## Version 2018/03/06 - Changelog: https://github.com/linuxserver/docker-heimdall/commits/master/root/defaults/default
server {
listen 80 default_server;
@@ -12,10 +14,21 @@ server {
ssl_certificate_key /config/keys/cert.key;
client_max_body_size 0;
error_page 599 = @noauth;
location / {
try_files $uri $uri/ /index.php?$args;
}
location / {
if (!-f /config/nginx/.htpasswd) {
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$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;

View File

@@ -1,10 +1,10 @@
#!/usr/bin/with-contenv bash
# create folders
# make our folders
mkdir -p \
/config/www/{backgrounds,icons}
/config/www/{backgrounds,icons}
# symlink user config
# create symlinks
symlinks=( \
/var/www/localhost/heimdall/storage/app/public/backgrounds \