start of next version

This commit is contained in:
Sebastian Hugentobler 2018-01-29 22:07:48 +01:00
parent 4f07810476
commit a7e1e8f87e
4 changed files with 20 additions and 58 deletions

View File

@ -1,55 +1,20 @@
FROM quay.io/thallian/php7-fpm:latest
FROM registry.gitlab.com/thallian/docker-php7-fpm:master
ENV FPMUSER nginx
ENV FPMGROUP nginx
ENV VERSION 12.0.0
RUN apk add --no-cache \
libressl \
tar \
nginx \
postgresql-client \
php7 \
php7-ctype \
php7-curl \
php7-dom \
php7-gd \
php7-iconv \
php7-json \
php7-xml \
php7-xmlreader \
php7-xmlwriter \
php7-zlib \
php7-zip \
php7-pgsql \
php7-pdo_pgsql \
php7-openssl \
php7-ftp \
php7-session \
php7-mbstring \
php7-posix \
php7-pcntl \
php7-mcrypt \
php7-bz2 \
php7-exif \
php7-apcu \
php7-ldap \
php7-simplexml \
php7-fileinfo \
php7-opcache
RUN mkdir /var/lib/nextcloud
RUN wget -qO- https://download.nextcloud.com/server/releases/nextcloud-$VERSION.tar.bz2 | tar xj -C /var/lib/nextcloud --strip 1
WORKDIR /var/lib/nextcloud/
nextcloud \
nextcloud-user_ldap \
nextcloud-pgsql
RUN chown -R nginx:nginx /var/lib/nextcloud
RUN chmod +x /var/lib/nextcloud/occ
RUN chown -R nginx:nginx /usr/share/webapps/nextcloud
RUN mkdir /run/nginx
RUN apk del tar
ADD /rootfs /
VOLUME /var/lib/nextcloud/data

View File

@ -8,13 +8,12 @@ server {
server_name {{getenv "DOMAIN"}};
add_header X-Content-Type-Options nosniff;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag none;
add_header X-Download-Options noopen;
add_header X-Permitted-Cross-Domain-Policies none;
root /var/lib/nextcloud/;
root /usr/share/webapps/nextcloud/;
location = /robots.txt {
allow all;
@ -30,13 +29,15 @@ server {
return 301 $scheme://$host/remote.php/dav;
}
location /.well-known/acme-challenge { }
client_max_body_size {{getenv "MAX_UPLOAD_SIZE"}};
fastcgi_buffers 64 4K;
error_page 403 /core/templates/403.php;
error_page 404 /core/templates/404.php;
gzip on;
gzip_vary on;
gzip_comp_level 4;
gzip_min_length 256;
gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
location / {
rewrite ^ /index.php$uri;
@ -45,14 +46,13 @@ server {
location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ {
deny all;
}
location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) {
deny all;
}
location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+|core/templates/40[34])\.php(?:$|/) {
location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+)\.php(?:$|/) {
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param HTTPS on;
@ -70,21 +70,18 @@ server {
index index.php;
}
location ~* \.(?:css|js)$ {
location ~ \.(?:css|js|woff|svg|gif)$ {
try_files $uri /index.php$uri$is_args$args;
add_header Cache-Control "public, max-age=7200";
add_header Cache-Control "public, max-age=15778463";
add_header X-Content-Type-Options nosniff;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag none;
add_header X-Download-Options noopen;
add_header X-Permitted-Cross-Domain-Policies none;
# Optional: Don't log access to assets
access_log off;
}
location ~* \.(?:svg|gif|png|html|ttf|woff|ico|jpg|jpeg)$ {
location ~ \.(?:png|html|ttf|ico|jpg|jpeg)$ {
try_files $uri /index.php$uri$is_args$args;
access_log off;
}

View File

@ -1 +1 @@
*/15 * * * * php -f /var/lib/nextcloud/cron.php
*/15 * * * * php -f /usr/share/webapps/nextcloud/cron.php