diff --git a/app/docker-entrypoint.sh b/app/docker-entrypoint.sh index 7e16d69..36c0419 100644 --- a/app/docker-entrypoint.sh +++ b/app/docker-entrypoint.sh @@ -16,7 +16,16 @@ echo "Starting Nginx:" nginx echo "Getting PPM ready:" -trapIt () { "$@"& pid="$!"; trap 'kill -INT $pid' INT TERM; while kill -0 $pid > /dev/null 2>&1; do wait $pid; ec="$?"; done; exit $ec;}; +trapIt() { + "$@" & + pid="$!" + trap 'kill -INT $pid' INT TERM + while kill -0 $pid >/dev/null 2>&1; do + wait $pid + ec="$?" + done + exit $ec +} echo "Starting PPM:" trapIt /ppm/vendor/bin/ppm start --ansi --no-interaction --config=ppm.json diff --git a/app/nginx.conf b/app/nginx.conf index 677210a..aa504cc 100644 --- a/app/nginx.conf +++ b/app/nginx.conf @@ -3,52 +3,52 @@ pid /tmp/nginx.pid; daemon on; events { - worker_connections 1024; + worker_connections 1024; } http { - ## - # Basic Settings - ## - sendfile on; - tcp_nopush on; - tcp_nodelay on; - keepalive_timeout 65; - types_hash_max_size 2048; - server_tokens off; # Do not announce nginx's version to the world! + ## + # Basic Settings + ## + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 65; + types_hash_max_size 2048; + server_tokens off; # Do not announce nginx's version to the world! - # server_names_hash_bucket_size 64; - # server_name_in_redirect off; + # server_names_hash_bucket_size 64; + # server_name_in_redirect off; - include /etc/nginx/mime.types; - default_type application/octet-stream; + include /etc/nginx/mime.types; + default_type application/octet-stream; - ## - # Logging Settings - ## - access_log /var/log/nginx/access.log; - error_log /var/log/nginx/error.log; + ## + # Logging Settings + ## + access_log /var/log/nginx/access.log; + error_log /var/log/nginx/error.log; - ## - # Proxy Settings - ## - proxy_buffering off; + ## + # Proxy Settings + ## + proxy_buffering off; - ## - # Gzip Settings - ## - gzip on; - gzip_disable "msie6"; + ## + # 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/javascript text/xml application/xml application/xml+rss text/javascript; + 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/javascript text/xml application/xml application/xml+rss text/javascript; - ## - # Virtual Host Configs - ## - include /etc/nginx/sites-enabled/*; + ## + # Virtual Host Configs + ## + include /etc/nginx/sites-enabled/*; } diff --git a/bookstack.sh b/bookstack.sh index 79eb457..0e28813 100644 --- a/bookstack.sh +++ b/bookstack.sh @@ -2,18 +2,13 @@ # Setup process - # Check if .env exists - ## if not create .env and start guided setup ### Check dependencies e.g. openssl/libressl -#### Generate key +#### Generate key openssl rand -base64 32 # Check is there is new version and offer to download ## if .env exists but is and old version then Update and get user input - - -