mirror of
https://github.com/linuxserver/docker-heimdall.git
synced 2025-10-26 02:33:46 +09:00
Initial commit
This commit is contained in:
6
.dockerignore
Normal file
6
.dockerignore
Normal file
@@ -0,0 +1,6 @@
|
||||
.git
|
||||
.gitignore
|
||||
.github
|
||||
.gitattributes
|
||||
READMETEMPLATE.md
|
||||
README.md
|
||||
17
.gitattributes
vendored
Normal file
17
.gitattributes
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
# Auto detect text files and perform LF normalization
|
||||
* text=auto
|
||||
|
||||
# Custom for Visual Studio
|
||||
*.cs diff=csharp
|
||||
|
||||
# Standard to msysgit
|
||||
*.doc diff=astextplain
|
||||
*.DOC diff=astextplain
|
||||
*.docx diff=astextplain
|
||||
*.DOCX diff=astextplain
|
||||
*.dot diff=astextplain
|
||||
*.DOT diff=astextplain
|
||||
*.pdf diff=astextplain
|
||||
*.PDF diff=astextplain
|
||||
*.rtf diff=astextplain
|
||||
*.RTF diff=astextplain
|
||||
21
.github/ISSUE_TEMPLATE.md
vendored
Normal file
21
.github/ISSUE_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
<!--- Provide a general summary of the issue in the Title above -->
|
||||
|
||||
[linuxserverurl]: https://linuxserver.io
|
||||
[][linuxserverurl]
|
||||
|
||||
|
||||
<!--- If you have an issue with the project, please provide us with the following information -->
|
||||
|
||||
<!--- Host OS -->
|
||||
<!--- Command line users, your run/create command, GUI/Unraid users, a screenshot of your template settings. -->
|
||||
<!--- Docker log output, docker log <container-name> -->
|
||||
<!--- Mention if you're using symlinks on any of the volume mounts. -->
|
||||
|
||||
|
||||
<!--- If you have a suggestion or fix for the project, please provide us with the following information -->
|
||||
|
||||
<!--- What you think your suggestion brings to the project, or fixes with the project -->
|
||||
<!--- If it's a fix, would it be better suited as a Pull request to the repo ? -->
|
||||
|
||||
## Thanks, team linuxserver.io
|
||||
|
||||
15
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
15
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
<!--- Provide a general summary of your changes in the Title above -->
|
||||
|
||||
[linuxserverurl]: https://linuxserver.io
|
||||
[][linuxserverurl]
|
||||
|
||||
|
||||
<!--- Before submitting a pull request please check the following -->
|
||||
|
||||
<!--- That you have made a branch in your fork, we'd rather not merge from your master -->
|
||||
<!--- That if the PR is addressing an existing issue include, closes #<issue number> , in the body of the PR commit message -->
|
||||
<!--- You have included links to any files / patches etc your PR may be using in the body of the PR commit message -->
|
||||
<!--- -->
|
||||
|
||||
## Thanks, team linuxserver.io
|
||||
|
||||
43
.gitignore
vendored
Normal file
43
.gitignore
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
# Windows image file caches
|
||||
Thumbs.db
|
||||
ehthumbs.db
|
||||
|
||||
# Folder config file
|
||||
Desktop.ini
|
||||
|
||||
# Recycle Bin used on file shares
|
||||
$RECYCLE.BIN/
|
||||
|
||||
# Windows Installer files
|
||||
*.cab
|
||||
*.msi
|
||||
*.msm
|
||||
*.msp
|
||||
|
||||
# Windows shortcuts
|
||||
*.lnk
|
||||
|
||||
# =========================
|
||||
# Operating System Files
|
||||
# =========================
|
||||
|
||||
# OSX
|
||||
# =========================
|
||||
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
|
||||
# Thumbnails
|
||||
._*
|
||||
|
||||
# Files that might appear on external disk
|
||||
.Spotlight-V100
|
||||
.Trashes
|
||||
|
||||
# Directories potentially created on remote AFP share
|
||||
.AppleDB
|
||||
.AppleDesktop
|
||||
Network Trash Folder
|
||||
Temporary Items
|
||||
.apdisk
|
||||
35
Dockerfile
Normal file
35
Dockerfile
Normal file
@@ -0,0 +1,35 @@
|
||||
FROM lsiobase/alpine.nginx:3.7
|
||||
|
||||
# set version label
|
||||
ARG BUILD_DATE
|
||||
ARG VERSION
|
||||
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
||||
LABEL maintainer="aptalca"
|
||||
|
||||
# environment settings
|
||||
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2
|
||||
|
||||
# install packages
|
||||
RUN \
|
||||
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}**" && \
|
||||
curl -o \
|
||||
/tmp/heimdall.tar.gz -L \
|
||||
"https://github.com/linuxserver/Heimdall/archive/${VERSION}.tar.gz" && \
|
||||
tar xf \
|
||||
/tmp/heimdall.tar.gz -C \
|
||||
/tmp && \
|
||||
cp -R /tmp/Heimdall-*/* /app/heimdall/ && \
|
||||
echo "** cleanup **" && \
|
||||
rm -rf \
|
||||
/tmp/*
|
||||
|
||||
# add local files
|
||||
COPY root/ /
|
||||
98
README.md
Normal file
98
README.md
Normal file
@@ -0,0 +1,98 @@
|
||||
[linuxserverurl]: https://linuxserver.io
|
||||
[forumurl]: https://forum.linuxserver.io
|
||||
[ircurl]: https://www.linuxserver.io/irc/
|
||||
[podcasturl]: https://www.linuxserver.io/podcast/
|
||||
[appurl]: https://nginx.org/
|
||||
[hub]: https://hub.docker.com/r/linuxserver/nginx/
|
||||
|
||||
[][linuxserverurl]
|
||||
|
||||
The [LinuxServer.io][linuxserverurl] team brings you another container release featuring easy user mapping and community support. Find us for support at:
|
||||
* [forum.linuxserver.io][forumurl]
|
||||
* [IRC][ircurl] on freenode at `#linuxserver.io`
|
||||
* [Podcast][podcasturl] covers everything to do with getting the most from your Linux Server plus a focus on all things Docker and containerisation!
|
||||
|
||||
# linuxserver/nginx
|
||||
[](https://microbadger.com/images/linuxserver/nginx "Get your own version badge on microbadger.com")[](https://microbadger.com/images/linuxserver/nginx "Get your own image badge on microbadger.com")[][hub][][hub][](https://ci.linuxserver.io/job/Docker-Builders/job/x86-64/job/x86-64-nginx/)
|
||||
|
||||
This Container is a simple nginx webserver configured with default and ssl, and all relevant config files moved out the user via /config for ultimate control. it contains some of the basic php-packages. and is built on our internal nginx baseimage.
|
||||
|
||||
[][appurl]
|
||||
|
||||
## Usage
|
||||
|
||||
```
|
||||
docker create \
|
||||
--name=nginx \
|
||||
-v <path to data>:/config \
|
||||
-e PGID=<gid> -e PUID=<uid> \
|
||||
-p 80:80 -p 443:443 \
|
||||
-e TZ=<timezone> \
|
||||
linuxserver/nginx
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
`The parameters are split into two halves, separated by a colon, the left hand side representing the host and the right the container side.
|
||||
For example with a port -p external:internal - what this shows is the port mapping from internal to external of the container.
|
||||
So -p 8080:80 would expose port 80 from inside the container to be accessible from the host's IP on port 8080
|
||||
http://192.168.x.x:8080 would show you what's running INSIDE the container on port 80.`
|
||||
|
||||
|
||||
* `-p 80` - The web-services.
|
||||
* `-p 443` - The SSL-Based Webservice
|
||||
* `-v /config` - Contains your www content and all relevant configuration files.
|
||||
* `-e PGID` for GroupID - see below for explanation
|
||||
* `-e PUID` for UserID - see below for explanation
|
||||
* `-e TZ` - timezone ie. `America/New_York`
|
||||
|
||||
It is based on alpine linux with s6 overlay, for shell access whilst the container is running do `docker exec -it nginx /bin/bash`.
|
||||
|
||||
### User / Group Identifiers
|
||||
|
||||
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" ™.
|
||||
|
||||
In this instance `PUID=1001` and `PGID=1001`. To find yours use `id user` as below:
|
||||
|
||||
```
|
||||
$ id <dockeruser>
|
||||
uid=1001(dockeruser) gid=1001(dockergroup) groups=1001(dockergroup)
|
||||
```
|
||||
|
||||
## Setting up the application
|
||||
|
||||
Add your web files to /config/www for hosting.
|
||||
|
||||
*Protip: This container is best combined with a sql server, e.g. [mariadb](https://hub.docker.com/r/linuxserver/mariadb/)*
|
||||
|
||||
|
||||
## Info
|
||||
|
||||
* To monitor the logs of the container in realtime `docker logs -f nginx`.
|
||||
|
||||
|
||||
* container version number
|
||||
|
||||
`docker inspect -f '{{ index .Config.Labels "build_version" }}' nginx`
|
||||
|
||||
* image version number
|
||||
|
||||
`docker inspect -f '{{ index .Config.Labels "build_version" }}' linuxserver/nginx`
|
||||
|
||||
## Versions
|
||||
|
||||
+ **05.01.18:** Rebase to alpine 3.7
|
||||
+ **08.11.17:** Add php7 soap module
|
||||
+ **31.10.17:** Add php7 exif and xmlreader modules
|
||||
+ **30.09.17:** Copy additional root files into image
|
||||
+ **24.09.17:** Add memcached service
|
||||
+ **31.08.17:** Add php7-phar
|
||||
+ **14.07.17:** Enable modules dynamically in nginx.conf
|
||||
+ **22.06.17:** Add various nginx modules and enable all modules in the default nginx.conf
|
||||
+ **05.06.17:** Add php7-bz2
|
||||
+ **25.05.17:** Rebase to alpine 3.6.
|
||||
+ **18.04.17:** Add php7-sockets
|
||||
+ **27.02.17:** Rebase to alpine 3.5, update to nginx 1.10.2 and php7
|
||||
+ **14.10.16:** Add version layer information.
|
||||
+ **10.09.16:** Add badges to README.
|
||||
+ **05.12.15:** Intial Release.
|
||||
30
root/defaults/default
Normal file
30
root/defaults/default
Normal file
@@ -0,0 +1,30 @@
|
||||
server {
|
||||
listen 80 default_server;
|
||||
|
||||
listen 443 ssl;
|
||||
|
||||
root /app/root;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
server_name _;
|
||||
|
||||
ssl_certificate /config/keys/cert.crt;
|
||||
ssl_certificate_key /config/keys/cert.key;
|
||||
|
||||
client_max_body_size 0;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args =404;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
# With php5-cgi alone:
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
# With php5-fpm:
|
||||
#fastcgi_pass unix:/var/run/php5-fpm.sock;
|
||||
fastcgi_index index.php;
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
}
|
||||
}
|
||||
98
root/defaults/nginx.conf
Normal file
98
root/defaults/nginx.conf
Normal file
@@ -0,0 +1,98 @@
|
||||
user abc;
|
||||
worker_processes 4;
|
||||
pid /run/nginx.pid;
|
||||
include /etc/nginx/modules/*.conf;
|
||||
|
||||
events {
|
||||
worker_connections 768;
|
||||
# multi_accept on;
|
||||
}
|
||||
|
||||
http {
|
||||
|
||||
##
|
||||
# Basic Settings
|
||||
##
|
||||
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
||||
keepalive_timeout 65;
|
||||
types_hash_max_size 2048;
|
||||
# server_tokens off;
|
||||
|
||||
# server_names_hash_bucket_size 64;
|
||||
# server_name_in_redirect off;
|
||||
|
||||
client_max_body_size 0;
|
||||
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
##
|
||||
# Logging Settings
|
||||
##
|
||||
|
||||
access_log /config/log/nginx/access.log;
|
||||
error_log /config/log/nginx/error.log;
|
||||
|
||||
##
|
||||
# Gzip Settings
|
||||
##
|
||||
|
||||
gzip on;
|
||||
gzip_disable "msie6";
|
||||
|
||||
# gzip_vary on;
|
||||
# gzip_proxied any;
|
||||
# gzip_comp_level 6;
|
||||
# gzip_buffers 16 8k;
|
||||
# gzip_http_version 1.1;
|
||||
# gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
|
||||
##
|
||||
# nginx-naxsi config
|
||||
##
|
||||
# Uncomment it if you installed nginx-naxsi
|
||||
##
|
||||
|
||||
#include /etc/nginx/naxsi_core.rules;
|
||||
|
||||
##
|
||||
# nginx-passenger config
|
||||
##
|
||||
# Uncomment it if you installed nginx-passenger
|
||||
##
|
||||
|
||||
#passenger_root /usr;
|
||||
#passenger_ruby /usr/bin/ruby;
|
||||
|
||||
##
|
||||
# Virtual Host Configs
|
||||
##
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
include /config/nginx/site-confs/*;
|
||||
}
|
||||
|
||||
|
||||
#mail {
|
||||
# # See sample authentication script at:
|
||||
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
|
||||
#
|
||||
# # auth_http localhost/auth.php;
|
||||
# # pop3_capabilities "TOP" "USER";
|
||||
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
|
||||
#
|
||||
# server {
|
||||
# listen localhost:110;
|
||||
# protocol pop3;
|
||||
# proxy on;
|
||||
# }
|
||||
#
|
||||
# server {
|
||||
# listen localhost:143;
|
||||
# protocol imap;
|
||||
# proxy on;
|
||||
# }
|
||||
#}
|
||||
daemon off;
|
||||
30
root/etc/cont-init.d/50-config
Normal file
30
root/etc/cont-init.d/50-config
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
# create folders
|
||||
mkdir -p \
|
||||
/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
|
||||
|
||||
# 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
|
||||
|
||||
# permissions
|
||||
chown -R abc:abc \
|
||||
/config \
|
||||
/app
|
||||
Reference in New Issue
Block a user