Compare commits

...

29 Commits
1 ... 74

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
sparklyballs
78ecdea6d6 Merge pull request #4 from linuxserver/release
Release
2018-02-12 15:22:08 +00:00
aptalca
f030577f75 Fix typo 2018-02-12 08:21:34 -05:00
aptalca
992949bd7c Update README.md 2018-02-12 08:17:13 -05:00
aptalca
b34b1691f4 Update README.md 2018-02-12 08:16:31 -05:00
aptalca
9386537608 Rename READMETEMPLATE.md to README.md 2018-02-11 10:20:36 -05:00
aptalca
3ed22863f7 Delete README.md 2018-02-11 10:20:17 -05:00
aptalca
b357db7900 Update READMETEMPLATE.md 2018-02-11 10:20:01 -05:00
sparklyballs
21ce2cff95 use HEIM_VER in place of VERSION to avoid confusion with env var 2018-02-09 11:58:04 +00:00
sparklyballs
cd50025f67 Merge pull request #3 from linuxserver/rm_baseurl
Remove baseurl, change www location
2018-02-08 08:13:24 +00:00
sparklyballs
8df0c56396 some tidying remove unneeded copy 2018-02-07 21:28:00 +00:00
sparklyballs
b570e58958 some tidying remove unneeded copy 2018-02-07 21:26:20 +00:00
aptalca
3fe9925064 fix www permissions 2018-02-07 16:23:02 -05:00
aptalca
275aa05c17 update www location 2018-02-07 16:21:32 -05:00
aptalca
f8313f706d change root location 2018-02-07 16:19:52 -05:00
aptalca
eb5710279a change www location 2018-02-07 16:19:10 -05:00
aptalca
dcb82e63c4 remove baseurl config 2018-02-07 16:16:24 -05:00
sparklyballs
f0fb1690eb Merge pull request #1 from linuxserver/symlinks_ugh
Symlinks ugh
2018-02-07 19:56:08 +00:00
sparklyballs
61aecdb033 add logic for non-existant link and file not existing either 2018-02-07 16:47:02 +00:00
sparklyballs
41fd08cadb not released yet use in progress README 2018-02-07 16:28:40 +00:00
sparklyballs
458ed75332 shellchecking 2018-02-07 16:21:04 +00:00
sparklyballs
21cca50992 use loop for symlinks and only make if they don't exist 2018-02-07 16:17:00 +00:00
4 changed files with 56 additions and 41 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,27 +9,28 @@ 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 \
php7-pdo_sqlite \
php7-tokenizer \
tar && \
mkdir -p /app/heimdall && \
VERSION="$(curl -sX GET https://api.github.com/repos/linuxserver/Heimdall/releases/latest | grep 'tag_name' | cut -d\" -f4)" && \
echo "**Installing Heimdall ${VERSION}**" && \
echo "**** install heimdall ****" && \
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/${VERSION}.tar.gz" && \
/tmp/heimdall.tar.gz -L \
"https://github.com/linuxserver/Heimdall/archive/${HEIM_VER}.tar.gz" && \
tar xf \
/tmp/heimdall.tar.gz -C \
/tmp && \
cp -R /tmp/Heimdall-*/* /app/heimdall/ && \
echo "** cleanup **" && \
/tmp/heimdall.tar.gz -C \
/var/www/localhost/heimdall --strip-components=1 && \
echo "**** cleanup ****" && \
rm -rf \
/tmp/*
/tmp/*
# add local files
COPY root/ /

View File

@@ -13,7 +13,7 @@ The [LinuxServer.io][linuxserverurl] team brings you another container release f
* [Podcast][podcasturl] covers everything to do with getting the most from your Linux Server plus a focus on all things Docker and containerisation!
# linuxserver/heimdall
[![](https://images.microbadger.com/badges/version/linuxserver/nginx.svg)](https://microbadger.com/images/linuxserver/nginx "Get your own version badge on microbadger.com")[![](https://images.microbadger.com/badges/image/linuxserver/nginx.svg)](https://microbadger.com/images/linuxserver/nginx "Get your own image badge on microbadger.com")[![Docker Pulls](https://img.shields.io/docker/pulls/linuxserver/nginx.svg)][hub][![Docker Stars](https://img.shields.io/docker/stars/linuxserver/nginx.svg)][hub][![Build Status](https://ci.linuxserver.io/buildStatus/icon?job=Docker-Builders/x86-64/x86-64-nginx)](https://ci.linuxserver.io/job/Docker-Builders/job/x86-64/job/x86-64-nginx/)
[![](https://images.microbadger.com/badges/version/linuxserver/heimdall.svg)](https://microbadger.com/images/linuxserver/heimdall "Get your own version badge on microbadger.com")[![](https://images.microbadger.com/badges/image/linuxserver/heimdall.svg)](https://microbadger.com/images/linuxserver/heimdall "Get your own image badge on microbadger.com")[![Docker Pulls](https://img.shields.io/docker/pulls/linuxserver/heimdall.svg)][hub][![Docker Stars](https://img.shields.io/docker/stars/linuxserver/heimdall.svg)][hub][![Build Status](https://ci.linuxserver.io/buildStatus/icon?job=Docker-Builders/x86-64/x86-64-heimdall)](https://ci.linuxserver.io/job/Docker-Builders/job/x86-64/job/x86-64-heimdall/)
Heimdall is a way to organise all those links to your most used web sites and web applications in a simple way.
@@ -21,7 +21,7 @@ Simplicity is the key to Heimdall.
Why not use it as your browser start page? It even has the ability to include a search bar using either Google, Bing or DuckDuckGo.
[![nginx](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/nginx-banner.png)][appurl]
[![heimdall](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/heimdall-banner.png)][appurl]
## Usage
@@ -49,7 +49,6 @@ http://192.168.x.x:8080 would show you what's running INSIDE the container on po
* `-e PGID` for GroupID - see below for explanation
* `-e PUID` for UserID - see below for explanation
* `-e TZ` - timezone ie. `America/New_York`
* `-e BASEURL` - _optional_ - you can set a base url through this variable to serve the app at http://SERVERIP:PORT/BASEURL
It is based on alpine linux with s6 overlay, for shell access whilst the container is running do `docker exec -it heimdall /bin/bash`.
@@ -68,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`.
@@ -83,4 +86,9 @@ Access the web gui at http://SERVERIP:PORT
## Versions
+ **XX.02.18:** Intial Release.
+ **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,9 +1,11 @@
## Version 2018/03/06 - Changelog: https://github.com/linuxserver/docker-heimdall/commits/master/root/defaults/default
server {
listen 80 default_server;
listen 443 ssl;
root /app/root;
root /var/www/localhost/heimdall/public;
index index.php index.html index.htm;
server_name _;
@@ -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,30 +1,23 @@
#!/usr/bin/with-contenv bash
# create folders
# make our folders
mkdir -p \
/config/www/{backgrounds,icons}
/config/www/{backgrounds,icons}
# set base url if needed
rm -rf /app/root
if [ -z "$BASEURL" ]; then
echo "No base url set. You can access the app at http://SERVERIP:PORT"
ln -s ./heimdall/public /app/root
else
echo "Setting base url. You can access the app at http://SERVERIP:PORT/$BASEURL"
mkdir -p /app/root
ln -s ../heimdall/public /app/root/"$BASEURL"
fi
# create symlinks
# symlink user config
rm -rf \
/app/heimdall/storage/app/public/backgrounds \
/app/heimdall/storage/app/public/icons \
/app/heimdall/database/app.sqlite
ln -s /config/www/backgrounds /app/heimdall/storage/app/public/backgrounds
ln -s /config/www/icons /app/heimdall/storage/app/public/icons
ln -s /config/www/app.sqlite /app/heimdall/database/app.sqlite
symlinks=( \
/var/www/localhost/heimdall/storage/app/public/backgrounds \
/var/www/localhost/heimdall/storage/app/public/icons \
/var/www/localhost/heimdall/database/app.sqlite )
for i in "${symlinks[@]}"
do
[[ -e "$i" && ! -L "$i" ]] && rm -rf "$i"
[[ ! -L "$i" ]] && ln -s /config/www/"$(basename "$i")" "$i"
done
# permissions
chown -R abc:abc \
/config \
/app
/var/www/localhost/heimdall