From 9ef3b652fcc9191518dd6b119538f6f19cf03d9f Mon Sep 17 00:00:00 2001 From: Dennis Schwerdel Date: Sat, 22 Dec 2018 15:38:38 +0100 Subject: [PATCH] update --- CHANGELOG | 6 ++++++ CloudronManifest.json | 2 +- Dockerfile | 13 +++++++++++-- nginx.conf | 3 +++ start.sh | 2 ++ 5 files changed, 23 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index d8d43b4..df99779 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,3 +3,9 @@ [0.1.1] * Updated to base image 0.10.0 + +[0.2.0] +* Updated to base image 1.0.0 +* nginx 1.15.0 (backport) +* redirect folder to folder/ +* absolute_redirect off diff --git a/CloudronManifest.json b/CloudronManifest.json index 2bd1c33..03ac495 100644 --- a/CloudronManifest.json +++ b/CloudronManifest.json @@ -7,7 +7,7 @@ "tags": [ "webserver" ], - "version": "0.1.1", + "version": "0.2.0", "healthCheckPath": "/", "httpPort": 8000, "manifestVersion": 1, diff --git a/Dockerfile b/Dockerfile index 622cad3..996e2d6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,16 @@ -FROM cloudron/base:0.10.0 +FROM cloudron/base:1.0.0 MAINTAINER Dennis Schwerdel RUN mkdir -p /app/code WORKDIR /app/code +RUN wget http://nginx.org/keys/nginx_signing.key && \ + apt-key add nginx_signing.key && \ + rm nginx_signing.key && \ + echo "deb http://nginx.org/packages/mainline/ubuntu/ $(lsb_release -cs) nginx" > /etc/apt/sources.list.d/nginx.list && \ + apt update && \ + apt install -y nginx + ADD nginx.conf /app/code/nginx.conf.default ADD public /app/code/public.default ADD fpm.conf /etc/php/7.0/fpm/php-fpm.conf @@ -13,9 +20,11 @@ RUN mkdir /run/nginx && \ rm /var/log/nginx/*.log && \ ln -s /dev/stderr /var/log/nginx/error.log && \ ln -s /dev/stdout /var/log/nginx/access.log && \ - rmdir /var/lib/nginx && ln -s /tmp /var/lib/nginx + rmdir /var/cache/nginx && ln -s /tmp /var/cache/nginx RUN chown -R cloudron:cloudron /app/code /run/nginx +WORKDIR /app/data + CMD [ "/app/code/start.sh" ] diff --git a/nginx.conf b/nginx.conf index 152469d..fe39270 100644 --- a/nginx.conf +++ b/nginx.conf @@ -20,6 +20,9 @@ http { root /app/data/public; index index.php index.html index.htm; + try_files $uri $uri/ =404; + absolute_redirect off; + # Uncomment to add a redirect #return 302 $scheme://WWW.REDIRECT.TO.COM$request_uri; diff --git a/start.sh b/start.sh index 99d59b3..1a4e912 100755 --- a/start.sh +++ b/start.sh @@ -12,5 +12,7 @@ fi chown -R cloudron:cloudron /app/data +export HOME=/app/data + /usr/sbin/php-fpm7.0 & exec /usr/sbin/nginx -c /app/data/nginx.conf -g 'daemon off;'