mirror of
https://github.com/hoellen/dockerfiles.git
synced 2025-04-20 04:19:18 +00:00
nextcloud: fix pgsql, add 10beta, update readme
This commit is contained in:
parent
744b3fb047
commit
1269a34a11
65
nextcloud/10.0/Dockerfile
Normal file
65
nextcloud/10.0/Dockerfile
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
FROM alpine:3.4
|
||||||
|
MAINTAINER Wonderfall <wonderfall@schrodinger.io>
|
||||||
|
|
||||||
|
ARG NEXTCLOUD_VERSION=10.0beta
|
||||||
|
|
||||||
|
ENV GID=991 UID=991
|
||||||
|
|
||||||
|
RUN echo "@commuedge https://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \
|
||||||
|
&& echo "@testing https://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
|
||||||
|
&& BUILD_DEPS="tar" \
|
||||||
|
&& apk -U add \
|
||||||
|
${BUILD_DEPS} \
|
||||||
|
nginx \
|
||||||
|
supervisor \
|
||||||
|
openssl \
|
||||||
|
ca-certificates \
|
||||||
|
tini@commuedge \
|
||||||
|
php7@testing \
|
||||||
|
php7-fpm@testing \
|
||||||
|
php7-intl@testing \
|
||||||
|
php7-mbstring@testing \
|
||||||
|
php7-curl@testing \
|
||||||
|
php7-gd@testing \
|
||||||
|
php7-mcrypt@testing \
|
||||||
|
php7-opcache@testing \
|
||||||
|
php7-json@testing \
|
||||||
|
php7-session@testing \
|
||||||
|
php7-pdo@testing \
|
||||||
|
php7-dom@testing \
|
||||||
|
php7-ctype@testing \
|
||||||
|
php7-iconv@testing \
|
||||||
|
php7-pdo_mysql@testing \
|
||||||
|
php7-pdo_pgsql@testing \
|
||||||
|
php7-pgsql@testing \
|
||||||
|
php7-zlib@testing \
|
||||||
|
php7-zip@testing \
|
||||||
|
php7-xmlreader@testing \
|
||||||
|
php7-posix@testing \
|
||||||
|
php7-openssl@testing \
|
||||||
|
php7-ldap@testing \
|
||||||
|
php7-apcu@testing \
|
||||||
|
&& mkdir /nextcloud && cd /tmp \
|
||||||
|
&& wget -q https://download.nextcloud.com/server/prereleases/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2 \
|
||||||
|
&& tar xjf latest.tar.bz2 --strip 1 -C /nextcloud \
|
||||||
|
&& apk del ${BUILD_DEPS} \
|
||||||
|
&& rm -rf /var/cache/apk/* /tmp/*
|
||||||
|
|
||||||
|
COPY nginx.conf /etc/nginx/nginx.conf
|
||||||
|
COPY php-fpm.conf /etc/php7/php-fpm.conf
|
||||||
|
COPY opcache.ini /etc/php7/conf.d/00_opcache.ini
|
||||||
|
COPY apcu.ini /etc/php7/conf.d/apcu.ini
|
||||||
|
COPY supervisord.conf /etc/supervisor/supervisord.conf
|
||||||
|
COPY run.sh /usr/local/bin/run.sh
|
||||||
|
COPY cron /etc/periodic/15min/nextcloud
|
||||||
|
|
||||||
|
RUN chmod +x /usr/local/bin/run.sh /etc/periodic/15min/nextcloud
|
||||||
|
|
||||||
|
VOLUME /data /config /apps2
|
||||||
|
|
||||||
|
EXPOSE 80
|
||||||
|
|
||||||
|
LABEL description="A server software for creating file hosting services" \
|
||||||
|
nextcloud="Nextcloud daily build"
|
||||||
|
|
||||||
|
CMD ["/sbin/tini","--","run.sh"]
|
4
nextcloud/10.0/apcu.ini
Normal file
4
nextcloud/10.0/apcu.ini
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
extension=apcu.so
|
||||||
|
apc.enabled=1
|
||||||
|
apc.shm_size=128M
|
||||||
|
apc.ttl=7200
|
2
nextcloud/10.0/cron
Normal file
2
nextcloud/10.0/cron
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
su - nextcloud -c "php7 -f /nextcloud/cron.php" > /dev/null 2>&1
|
105
nextcloud/10.0/nginx.conf
Normal file
105
nextcloud/10.0/nginx.conf
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
user nextcloud;
|
||||||
|
worker_processes auto;
|
||||||
|
pid /var/run/nginx.pid;
|
||||||
|
daemon off;
|
||||||
|
|
||||||
|
events {
|
||||||
|
worker_connections 1024;
|
||||||
|
use epoll;
|
||||||
|
}
|
||||||
|
|
||||||
|
http {
|
||||||
|
include /etc/nginx/mime.types;
|
||||||
|
default_type application/octet-stream;
|
||||||
|
|
||||||
|
access_log off;
|
||||||
|
error_log /var/log/nginx/error.log error;
|
||||||
|
|
||||||
|
sendfile on;
|
||||||
|
keepalive_timeout 15;
|
||||||
|
keepalive_disable msie6;
|
||||||
|
keepalive_requests 100;
|
||||||
|
tcp_nopush on;
|
||||||
|
tcp_nodelay on;
|
||||||
|
server_tokens off;
|
||||||
|
|
||||||
|
fastcgi_temp_path /tmp/fastcgi 1 2;
|
||||||
|
client_body_temp_path /tmp/client_body 1 2;
|
||||||
|
|
||||||
|
gzip on;
|
||||||
|
gzip_comp_level 5;
|
||||||
|
gzip_min_length 512;
|
||||||
|
gzip_buffers 4 8k;
|
||||||
|
gzip_proxied any;
|
||||||
|
gzip_vary on;
|
||||||
|
gzip_disable "msie6";
|
||||||
|
gzip_types
|
||||||
|
text/css
|
||||||
|
text/javascript
|
||||||
|
text/xml
|
||||||
|
text/plain
|
||||||
|
text/x-component
|
||||||
|
application/javascript
|
||||||
|
application/x-javascript
|
||||||
|
application/json
|
||||||
|
application/xml
|
||||||
|
application/rss+xml
|
||||||
|
application/vnd.ms-fontobject
|
||||||
|
font/truetype
|
||||||
|
font/opentype
|
||||||
|
image/svg+xml;
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
index index.php;
|
||||||
|
root /nextcloud;
|
||||||
|
client_max_body_size 10G;
|
||||||
|
fastcgi_buffers 64 4K;
|
||||||
|
rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
|
||||||
|
rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
|
||||||
|
rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
|
||||||
|
error_page 403 /core/templates/403.php;
|
||||||
|
error_page 404 /core/templates/404.php;
|
||||||
|
|
||||||
|
add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;";
|
||||||
|
add_header X-Frame-Options SAMEORIGIN;
|
||||||
|
add_header X-Content-Type-Options nosniff;
|
||||||
|
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;
|
||||||
|
|
||||||
|
location = /robots.txt {
|
||||||
|
allow all;
|
||||||
|
log_not_found off;
|
||||||
|
access_log off;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ ^/(data|config|\.ht|db_structure\.xml|README) {
|
||||||
|
deny all;
|
||||||
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
|
||||||
|
rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
|
||||||
|
rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
|
||||||
|
rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
|
||||||
|
rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
|
||||||
|
try_files $uri $uri/ index.php;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ ^(.+?\.php)(/.*)?$ {
|
||||||
|
try_files $1 = 404;
|
||||||
|
include fastcgi_params;
|
||||||
|
fastcgi_param modHeadersAvailable true;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$1;
|
||||||
|
fastcgi_param PATH_INFO $2;
|
||||||
|
fastcgi_pass unix:/var/run/php-fpm.sock;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~* ^.+\.(jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
|
||||||
|
expires 30d;
|
||||||
|
access_log off;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
8
nextcloud/10.0/opcache.ini
Normal file
8
nextcloud/10.0/opcache.ini
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
zend_extension=opcache.so
|
||||||
|
opcache.enable=1
|
||||||
|
opcache.enable_cli=1
|
||||||
|
opcache.fast_shutdown=1
|
||||||
|
opcache.memory_consumption=128
|
||||||
|
opcache.interned_strings_buffer=16
|
||||||
|
opcache.max_accelerated_files=5413
|
||||||
|
opcache.revalidate_freq=60
|
22
nextcloud/10.0/php-fpm.conf
Normal file
22
nextcloud/10.0/php-fpm.conf
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
[global]
|
||||||
|
daemonize = no
|
||||||
|
|
||||||
|
[www]
|
||||||
|
user = nextcloud
|
||||||
|
group = nextcloud
|
||||||
|
listen = /var/run/php-fpm.sock
|
||||||
|
listen.owner = nextcloud
|
||||||
|
listen.group = nextcloud
|
||||||
|
pm = dynamic
|
||||||
|
pm.max_children = 10
|
||||||
|
pm.start_servers = 2
|
||||||
|
pm.min_spare_servers = 1
|
||||||
|
pm.max_spare_servers = 3
|
||||||
|
chdir = /
|
||||||
|
request_terminate_timeout = 1200
|
||||||
|
env[PATH] = /usr/local/bin:/usr/bin:/bin
|
||||||
|
php_admin_value[post_max_size] = 10G
|
||||||
|
php_admin_value[upload_max_filesize] = 10G
|
||||||
|
php_admin_value[max_execution_time] = 10800
|
||||||
|
php_admin_value[max_input_time] = 1200
|
||||||
|
|
23
nextcloud/10.0/run.sh
Normal file
23
nextcloud/10.0/run.sh
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
addgroup -g ${GID} nextcloud && adduser -h /nextcloud -s /bin/sh -D -G nextcloud -u ${UID} nextcloud
|
||||||
|
|
||||||
|
if [ -f /nextcloud/config/config.php ] && [ ! -f /config/config.php ]; then
|
||||||
|
cp /nextcloud/config/config.php /config/config.php
|
||||||
|
elif [ -f /config/config.php ]; then
|
||||||
|
if [ -f /nextcloud/config/config.php ]; then
|
||||||
|
sed -i "s/.*version.*/`grep "version" \/nextcloud\/config\/config.php`/" /config/config.php
|
||||||
|
CONFIG=`md5sum /config/config.php | awk '{ print $1 }'`
|
||||||
|
CONFIGINS=`md5sum /nextcloud/config/config.php | awk '{ print $1 }'`
|
||||||
|
if [ $CONFIG != $CONFIGINS ]; then
|
||||||
|
mv /nextcloud/config/config.php /config/config.php.bkp
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
cp /config/config.php /nextcloud/config/config.php
|
||||||
|
fi
|
||||||
|
|
||||||
|
touch /var/run/php-fpm.sock
|
||||||
|
mkdir /tmp/fastcgi /tmp/client_body
|
||||||
|
chown -R nextcloud:nextcloud /nextcloud /data /config /apps2 /var/run/php-fpm.sock /var/lib/nginx /tmp
|
||||||
|
ln -s /apps2 /nextcloud
|
||||||
|
|
||||||
|
supervisord -c /etc/supervisor/supervisord.conf
|
11
nextcloud/10.0/supervisord.conf
Normal file
11
nextcloud/10.0/supervisord.conf
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[supervisord]
|
||||||
|
nodaemon=true
|
||||||
|
|
||||||
|
[program:cron]
|
||||||
|
command=crond -f
|
||||||
|
|
||||||
|
[program:php-fpm]
|
||||||
|
command=php-fpm7
|
||||||
|
|
||||||
|
[program:nginx]
|
||||||
|
command=nginx
|
@ -1,4 +1,4 @@
|
|||||||
FROM alpine:edge
|
FROM alpine:3.4
|
||||||
MAINTAINER Wonderfall <wonderfall@schrodinger.io>
|
MAINTAINER Wonderfall <wonderfall@schrodinger.io>
|
||||||
|
|
||||||
ARG NEXTCLOUD_VERSION=9.0.53
|
ARG NEXTCLOUD_VERSION=9.0.53
|
||||||
@ -32,6 +32,7 @@ RUN echo "@commuedge https://nl.alpinelinux.org/alpine/edge/community" >> /etc/a
|
|||||||
php7-iconv@testing \
|
php7-iconv@testing \
|
||||||
php7-pdo_mysql@testing \
|
php7-pdo_mysql@testing \
|
||||||
php7-pdo_pgsql@testing \
|
php7-pdo_pgsql@testing \
|
||||||
|
php7-pgsql@testing \
|
||||||
php7-zlib@testing \
|
php7-zlib@testing \
|
||||||
php7-zip@testing \
|
php7-zip@testing \
|
||||||
php7-xmlreader@testing \
|
php7-xmlreader@testing \
|
||||||
|
@ -12,16 +12,11 @@
|
|||||||
- LDAP support.
|
- LDAP support.
|
||||||
- UID/GID flexibility.
|
- UID/GID flexibility.
|
||||||
|
|
||||||
| Docker Hub Image | Base Image | Image Size |
|
|
||||||
| ------------------- | -------------- | ---------- |
|
|
||||||
| **wonderfall/nextcloud** | **alpine:edge** | **201.9 MB** |
|
|
||||||
| greyltc/nextcloud | archlinux | 2.439 GB |
|
|
||||||
| thallian/nextcloud | alpine | 227 MB |
|
|
||||||
| mrxra/nextcloud | debian:jessie | 1.045 GB |
|
|
||||||
|
|
||||||
#### Tags
|
#### Tags
|
||||||
- **latest** : latest stable version.
|
- **latest** : latest stable version.
|
||||||
- **9.0** : latest 9.0.x version.
|
- **9.0** : latest 9.0.x version. (stable)
|
||||||
|
- **10.0** : latest 10.0.x version (beta!)
|
||||||
|
- **test** : latest test version provided by Nextcloud (RC, Beta...)
|
||||||
- **daily** : latest code (daily build).
|
- **daily** : latest code (daily build).
|
||||||
|
|
||||||
#### Build-time variables
|
#### Build-time variables
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
FROM alpine:edge
|
FROM alpine:3.4
|
||||||
MAINTAINER Wonderfall <wonderfall@schrodinger.io>
|
MAINTAINER Wonderfall <wonderfall@schrodinger.io>
|
||||||
|
|
||||||
ENV GID=991 UID=991
|
ENV GID=991 UID=991
|
||||||
@ -29,6 +29,7 @@ RUN echo "@commuedge https://nl.alpinelinux.org/alpine/edge/community" >> /etc/a
|
|||||||
php7-iconv@testing \
|
php7-iconv@testing \
|
||||||
php7-pdo_mysql@testing \
|
php7-pdo_mysql@testing \
|
||||||
php7-pdo_pgsql@testing \
|
php7-pdo_pgsql@testing \
|
||||||
|
php7-pgsql@testing \
|
||||||
php7-zlib@testing \
|
php7-zlib@testing \
|
||||||
php7-zip@testing \
|
php7-zip@testing \
|
||||||
php7-xmlreader@testing \
|
php7-xmlreader@testing \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user