mirror of
https://github.com/linuxserver/docker-heimdall.git
synced 2025-10-26 18:53:40 +09:00
Initial commit
This commit is contained in:
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