This commit is contained in:
Dennis Schwerdel 2018-12-22 15:38:38 +01:00
parent d4206eb4ee
commit 9ef3b652fc
5 changed files with 23 additions and 3 deletions

View File

@ -3,3 +3,9 @@
[0.1.1] [0.1.1]
* Updated to base image 0.10.0 * 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

View File

@ -7,7 +7,7 @@
"tags": [ "tags": [
"webserver" "webserver"
], ],
"version": "0.1.1", "version": "0.2.0",
"healthCheckPath": "/", "healthCheckPath": "/",
"httpPort": 8000, "httpPort": 8000,
"manifestVersion": 1, "manifestVersion": 1,

View File

@ -1,9 +1,16 @@
FROM cloudron/base:0.10.0 FROM cloudron/base:1.0.0
MAINTAINER Dennis Schwerdel <schwerdel@googlemail.com> MAINTAINER Dennis Schwerdel <schwerdel@googlemail.com>
RUN mkdir -p /app/code RUN mkdir -p /app/code
WORKDIR /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 nginx.conf /app/code/nginx.conf.default
ADD public /app/code/public.default ADD public /app/code/public.default
ADD fpm.conf /etc/php/7.0/fpm/php-fpm.conf ADD fpm.conf /etc/php/7.0/fpm/php-fpm.conf
@ -13,9 +20,11 @@ RUN mkdir /run/nginx && \
rm /var/log/nginx/*.log && \ rm /var/log/nginx/*.log && \
ln -s /dev/stderr /var/log/nginx/error.log && \ ln -s /dev/stderr /var/log/nginx/error.log && \
ln -s /dev/stdout /var/log/nginx/access.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 RUN chown -R cloudron:cloudron /app/code /run/nginx
WORKDIR /app/data
CMD [ "/app/code/start.sh" ] CMD [ "/app/code/start.sh" ]

View File

@ -20,6 +20,9 @@ http {
root /app/data/public; root /app/data/public;
index index.php index.html index.htm; index index.php index.html index.htm;
try_files $uri $uri/ =404;
absolute_redirect off;
# Uncomment to add a redirect # Uncomment to add a redirect
#return 302 $scheme://WWW.REDIRECT.TO.COM$request_uri; #return 302 $scheme://WWW.REDIRECT.TO.COM$request_uri;

View File

@ -12,5 +12,7 @@ fi
chown -R cloudron:cloudron /app/data chown -R cloudron:cloudron /app/data
export HOME=/app/data
/usr/sbin/php-fpm7.0 & /usr/sbin/php-fpm7.0 &
exec /usr/sbin/nginx -c /app/data/nginx.conf -g 'daemon off;' exec /usr/sbin/nginx -c /app/data/nginx.conf -g 'daemon off;'