parent
45701cdff3
commit
305f104455
11
.drone.yml
Normal file
11
.drone.yml
Normal file
|
@ -0,0 +1,11 @@
|
|||
pipeline:
|
||||
download:
|
||||
image: docker.io/fedora
|
||||
commands:
|
||||
- curl https://download.nextcloud.com/server/releases/nextcloud-12.0.5.tar.bz2 > nextcloud.tar.bz2
|
||||
docker:
|
||||
image: plugins/docker
|
||||
repo: docker.jcg.re/rainloop
|
||||
registry: docker.jcg.re
|
||||
secrets: [ docker_username, docker_password ]
|
||||
tags: latest
|
53
Caddyfile
Normal file
53
Caddyfile
Normal file
|
@ -0,0 +1,53 @@
|
|||
:8888
|
||||
root /nextcloud
|
||||
log /log/access.log
|
||||
errors /log/errors.log
|
||||
|
||||
fastcgi / /tmp/php-fpm.sock php {
|
||||
env PATH /bin
|
||||
}
|
||||
|
||||
# checks for images
|
||||
rewrite {
|
||||
ext .svg .gif .png .html .ttf .woff .ico .jpg .jpeg
|
||||
r ^/index.php/(.+)$
|
||||
to /{1} /index.php?{1}
|
||||
}
|
||||
|
||||
rewrite {
|
||||
r ^/index.php/.*$
|
||||
to /index.php?{query}
|
||||
}
|
||||
|
||||
# client support (e.g. os x calendar / contacts)
|
||||
redir /.well-known/carddav /remote.php/carddav 301
|
||||
redir /.well-known/caldav /remote.php/caldav 301
|
||||
|
||||
# remove trailing / as it causes errors with php-fpm
|
||||
rewrite {
|
||||
r ^/remote.php/(webdav|caldav|carddav|dav)(\/?)$
|
||||
to /remote.php/{1}
|
||||
}
|
||||
|
||||
rewrite {
|
||||
r ^/remote.php/(webdav|caldav|carddav|dav)/(.+?)(\/?)$
|
||||
to /remote.php/{1}/{2}
|
||||
}
|
||||
|
||||
rewrite {
|
||||
r ^/public.php/(.+?)(\/?)$
|
||||
to /public.php/(.+?)(\/?)$
|
||||
}
|
||||
|
||||
# .htaccess / data / config / ... shouldn't be accessible from outside
|
||||
status 403 {
|
||||
/.htacces
|
||||
/data
|
||||
/config
|
||||
/db_structure
|
||||
/.xml
|
||||
/README
|
||||
/log
|
||||
}
|
||||
|
||||
header / Strict-Transport-Security "max-age=31536000;"
|
42
Dockerfile
Normal file
42
Dockerfile
Normal file
|
@ -0,0 +1,42 @@
|
|||
FROM docker.jcg.re/base-php
|
||||
ADD nextcloud.tar.bz2 /nextcloud
|
||||
RUN apk add --no-cache \
|
||||
php7-ctype \
|
||||
php7-dom \
|
||||
php7-gd \
|
||||
php7-iconv \
|
||||
php7-json \
|
||||
php7-xml \
|
||||
php7-mbstring \
|
||||
php7-posix \
|
||||
php7-simplexml \
|
||||
php7-xmlreader \
|
||||
php7-xmlwriter \
|
||||
php7-zip \
|
||||
php7-zlib \
|
||||
php7-pdo_sqlite \
|
||||
php7-pdo_mysql \
|
||||
php7-pdo_pgsql \
|
||||
php7-curl \
|
||||
php7-fileinfo \
|
||||
php7-bz2 \
|
||||
php7-intl \
|
||||
php7-mcrypt \
|
||||
php7-openssl \
|
||||
php7-ldap \
|
||||
php7-ftp \
|
||||
php7-imap \
|
||||
php7-exif \
|
||||
php7-gmp \
|
||||
php7-apcu \
|
||||
php7-memcached \
|
||||
php7-redis \
|
||||
php7-imagick \
|
||||
php7-pcntl \
|
||||
ffmpeg \
|
||||
&& mv nextcloud/nextcloud/* nextcloud \
|
||||
&& mkdir log \
|
||||
&& chmod -R a+rw log \
|
||||
&& sed -i "s#/phpapp#/nextcloud#" /etc/Caddyfile \
|
||||
&& sed -i "s#/phpapp#/nextcloud#" /etc/s6.d/php/run
|
||||
COPY Caddyfile /etc/Caddyfile
|
Loading…
Reference in a new issue