Skip to content

Commit f7e555c

Browse files
committed
Initial upload
First upload to Github
1 parent 0c7f5d0 commit f7e555c

File tree

9 files changed

+414
-0
lines changed

9 files changed

+414
-0
lines changed

.dockerignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.git
2+
.gitignore
3+
.github
4+
.gitattributes
5+
READMETEMPLATE.md
6+
README.md

.gitattributes

+15
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,17 @@
11
# Auto detect text files and perform LF normalization
22
* text=auto
3+
4+
# Custom for Visual Studio
5+
*.cs diff=csharp
6+
7+
# Standard to msysgit
8+
*.doc diff=astextplain
9+
*.DOC diff=astextplain
10+
*.docx diff=astextplain
11+
*.DOCX diff=astextplain
12+
*.dot diff=astextplain
13+
*.DOT diff=astextplain
14+
*.pdf diff=astextplain
15+
*.PDF diff=astextplain
16+
*.rtf diff=astextplain
17+
*.RTF diff=astextplain

.gitignore

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Windows image file caches
2+
Thumbs.db
3+
ehthumbs.db
4+
5+
# Folder config file
6+
Desktop.ini
7+
8+
# Recycle Bin used on file shares
9+
$RECYCLE.BIN/
10+
11+
# Windows Installer files
12+
*.cab
13+
*.msi
14+
*.msm
15+
*.msp
16+
17+
# Windows shortcuts
18+
*.lnk
19+
20+
# =========================
21+
# Operating System Files
22+
# =========================
23+
24+
# OSX
25+
# =========================
26+
27+
.DS_Store
28+
.AppleDouble
29+
.LSOverride
30+
31+
# Thumbnails
32+
._*
33+
34+
# Files that might appear on external disk
35+
.Spotlight-V100
36+
.Trashes
37+
38+
# Directories potentially created on remote AFP share
39+
.AppleDB
40+
.AppleDesktop
41+
Network Trash Folder
42+
Temporary Items
43+
.apdisk

Dockerfile

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# using ideas/code from other sparklyballs templates
2+
# set variable to get archive based on github api data (sparklyballs heimdall inspiration)
3+
4+
FROM lsiobase/alpine.nginx:3.7
5+
6+
# set version label
7+
ARG BUILD_DATE
8+
ARG VERSION
9+
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
10+
LABEL maintainer="homerr"
11+
12+
# install packages
13+
RUN \
14+
echo "**** install build packages ****" && \
15+
apk add --no-cache \
16+
curl \
17+
php7-openssl \
18+
php7-pdo_mysql \
19+
php7-mbstring \
20+
php7-tidy \
21+
php7-phar \
22+
php7-dom \
23+
php7-tokenizer \
24+
php7-gd \
25+
php7-mysqlnd \
26+
php7-tidy \
27+
php7-simplexml \
28+
tar && \
29+
30+
echo "**** configure php-fpm to pass env vars ****" && \
31+
sed -i \
32+
's/;clear_env = no/clear_env = no/g' \
33+
/etc/php7/php-fpm.d/www.conf && \
34+
echo "env[PATH] = /usr/local/bin:/usr/bin:/bin" >> /etc/php7/php-fpm.conf && \
35+
36+
echo "**** get bookstack ****" && \
37+
38+
BSAPP_VER="$(curl -sX GET https://api.github.com/repos/BookStackApp/BookStack/releases/latest | grep 'tag_name' | cut -d\" -f4)" && \
39+
40+
mkdir -p\
41+
/var/www/html && \
42+
43+
curl -o \
44+
/tmp/bookstack.tar.gz -L \
45+
"https://github.com/BookStackApp/BookStack/archive/${BSAPP_VER}.tar.gz" && \
46+
47+
tar xf \
48+
/tmp/bookstack.tar.gz -C \
49+
/var/www/html/ --strip-components=1 && \
50+
51+
cp /var/www/html/.env.example /var/www/html/.env && \
52+
53+
echo "**** get composer ****" && \
54+
55+
cd /tmp && \
56+
curl -sS https://getcomposer.org/installer | php && \
57+
mv /tmp/composer.phar /usr/local/bin/composer && \
58+
59+
echo "**** run composer install ****"
60+
61+
composer install -d /var/www/html/ && \
62+
63+
echo "**** cleanup ****" && \
64+
rm -rf \
65+
/root/.composer \
66+
/tmp/*
67+
68+
# copy local files
69+
COPY root/ /
70+
71+
# ports and volumes
72+
VOLUME /config

README.md

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
[linuxserverurl]: https://linuxserver.io
2+
[forumurl]: https://forum.linuxserver.io
3+
[ircurl]: https://www.linuxserver.io/irc/
4+
[podcasturl]: https://www.linuxserver.io/podcast/
5+
[appurl]: https://github.com/linuxserver/Heimdall
6+
[hub]: https://hub.docker.com/r/linuxserver/heimdall/
7+
8+
[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)][linuxserverurl]
9+
10+
The [LinuxServer.io][linuxserverurl] team brings you another container release featuring easy user mapping and community support. Find us for support at:
11+
* [forum.linuxserver.io][forumurl]
12+
* [IRC][ircurl] on freenode at `#linuxserver.io`
13+
* [Podcast][podcasturl] covers everything to do with getting the most from your Linux Server plus a focus on all things Docker and containerisation!
14+
15+
# linuxserver/heimdall
16+
[![](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/)
17+
18+
Heimdall is a way to organise all those links to your most used web sites and web applications in a simple way.
19+
20+
Simplicity is the key to Heimdall.
21+
22+
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.
23+
24+
[![heimdall](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/heimdall-banner.png)][appurl]
25+
26+
## Usage
27+
28+
```
29+
docker create \
30+
--name=heimdall \
31+
-v <path to data>:/config \
32+
-e PGID=<gid> -e PUID=<uid> \
33+
-p 80:80 -p 443:443 \
34+
-e TZ=<timezone> \
35+
linuxserver/heimdall
36+
```
37+
38+
## Parameters
39+
40+
`The parameters are split into two halves, separated by a colon, the left hand side representing the host and the right the container side.
41+
For example with a port -p external:internal - what this shows is the port mapping from internal to external of the container.
42+
So -p 8080:80 would expose port 80 from inside the container to be accessible from the host's IP on port 8080
43+
http://192.168.x.x:8080 would show you what's running INSIDE the container on port 80.`
44+
45+
46+
* `-p 80` - The web-services.
47+
* `-p 443` - The SSL-Based Webservice
48+
* `-v /config` - Contains your www content and all relevant configuration files.
49+
* `-e PGID` for GroupID - see below for explanation
50+
* `-e PUID` for UserID - see below for explanation
51+
* `-e TZ` - timezone ie. `America/New_York`
52+
53+
It is based on alpine linux with s6 overlay, for shell access whilst the container is running do `docker exec -it heimdall /bin/bash`.
54+
55+
### User / Group Identifiers
56+
57+
Sometimes when using data volumes (`-v` flags) permissions issues can arise between the host OS and the container. We avoid this issue by allowing you to specify the user `PUID` and group `PGID`. Ensure the data volume directory on the host is owned by the same user you specify and it will "just work" ™.
58+
59+
In this instance `PUID=1001` and `PGID=1001`. To find yours use `id user` as below:
60+
61+
```
62+
$ id <dockeruser>
63+
uid=1001(dockeruser) gid=1001(dockergroup) groups=1001(dockergroup)
64+
```
65+
66+
## Setting up the application
67+
68+
Access the web gui at http://SERVERIP:PORT
69+
70+
## Adding password protection
71+
72+
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.
73+
74+
## Info
75+
76+
* To monitor the logs of the container in realtime `docker logs -f heimdall`.
77+
78+
79+
* container version number
80+
81+
`docker inspect -f '{{ index .Config.Labels "build_version" }}' heimdall`
82+
83+
* image version number
84+
85+
`docker inspect -f '{{ index .Config.Labels "build_version" }}' linuxserver/heimdall`
86+
87+
## Versions
88+
89+
+ **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
90+
+ **12.02.18:** Initial Release.

root/defaults/default

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
## Version 2018/03/06 - Changelog: https://github.com/linuxserver/docker-heimdall/commits/master/root/defaults/default
2+
3+
server {
4+
listen 80 default_server;
5+
6+
listen 443 ssl;
7+
8+
root /var/www/html/public;
9+
index index.php index.html index.htm;
10+
11+
server_name _;
12+
13+
ssl_certificate /config/keys/cert.crt;
14+
ssl_certificate_key /config/keys/cert.key;
15+
16+
client_max_body_size 0;
17+
18+
error_page 599 = @noauth;
19+
20+
location @noauth {
21+
try_files $uri $uri/ /index.php?$args;
22+
}
23+
24+
location / {
25+
try_files $uri $uri/ /index.php?$query_string;
26+
27+
}
28+
29+
location ~ \.php$ {
30+
fastcgi_split_path_info ^(.+\.php)(/.+)$;
31+
# With php5-cgi alone:
32+
fastcgi_pass 127.0.0.1:9000;
33+
# With php5-fpm:
34+
#fastcgi_pass unix:/var/run/php5-fpm.sock;
35+
fastcgi_index index.php;
36+
include /etc/nginx/fastcgi_params;
37+
38+
}
39+
}

root/defaults/nginx.conf

+98
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
user abc;
2+
worker_processes 4;
3+
pid /run/nginx.pid;
4+
include /etc/nginx/modules/*.conf;
5+
6+
events {
7+
worker_connections 768;
8+
# multi_accept on;
9+
}
10+
11+
http {
12+
13+
##
14+
# Basic Settings
15+
##
16+
17+
sendfile on;
18+
tcp_nopush on;
19+
tcp_nodelay on;
20+
keepalive_timeout 65;
21+
types_hash_max_size 2048;
22+
# server_tokens off;
23+
24+
# server_names_hash_bucket_size 64;
25+
# server_name_in_redirect off;
26+
27+
client_max_body_size 0;
28+
29+
include /etc/nginx/mime.types;
30+
default_type application/octet-stream;
31+
32+
##
33+
# Logging Settings
34+
##
35+
36+
access_log /config/log/nginx/access.log;
37+
error_log /config/log/nginx/error.log;
38+
39+
##
40+
# Gzip Settings
41+
##
42+
43+
gzip on;
44+
gzip_disable "msie6";
45+
46+
# gzip_vary on;
47+
# gzip_proxied any;
48+
# gzip_comp_level 6;
49+
# gzip_buffers 16 8k;
50+
# gzip_http_version 1.1;
51+
# gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
52+
53+
##
54+
# nginx-naxsi config
55+
##
56+
# Uncomment it if you installed nginx-naxsi
57+
##
58+
59+
#include /etc/nginx/naxsi_core.rules;
60+
61+
##
62+
# nginx-passenger config
63+
##
64+
# Uncomment it if you installed nginx-passenger
65+
##
66+
67+
#passenger_root /usr;
68+
#passenger_ruby /usr/bin/ruby;
69+
70+
##
71+
# Virtual Host Configs
72+
##
73+
include /etc/nginx/conf.d/*.conf;
74+
include /config/nginx/site-confs/*;
75+
}
76+
77+
78+
#mail {
79+
# # See sample authentication script at:
80+
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
81+
#
82+
# # auth_http localhost/auth.php;
83+
# # pop3_capabilities "TOP" "USER";
84+
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
85+
#
86+
# server {
87+
# listen localhost:110;
88+
# protocol pop3;
89+
# proxy on;
90+
# }
91+
#
92+
# server {
93+
# listen localhost:143;
94+
# protocol imap;
95+
# proxy on;
96+
# }
97+
#}
98+
daemon off;

0 commit comments

Comments
 (0)