develop #10
7 changed files with 62 additions and 20 deletions
|
@ -18,6 +18,7 @@ steps:
|
||||||
# path: /stupid
|
# path: /stupid
|
||||||
environment:
|
environment:
|
||||||
DOCKER_REPO: glenux/service-nextcloud
|
DOCKER_REPO: glenux/service-nextcloud
|
||||||
|
DOCKER_BUILDKIT: 1
|
||||||
settings:
|
settings:
|
||||||
username:
|
username:
|
||||||
from_secret: DOCKERHUB_USERNAME
|
from_secret: DOCKERHUB_USERNAME
|
||||||
|
@ -33,6 +34,8 @@ steps:
|
||||||
# volumes:
|
# volumes:
|
||||||
# - name: cache
|
# - name: cache
|
||||||
# path: /stupid
|
# path: /stupid
|
||||||
|
environment:
|
||||||
|
DOCKER_BUILDKIT: 1
|
||||||
settings:
|
settings:
|
||||||
username:
|
username:
|
||||||
from_secret: DOCKERHUB_USERNAME
|
from_secret: DOCKERHUB_USERNAME
|
||||||
|
@ -50,6 +53,8 @@ steps:
|
||||||
|
|
||||||
- name: publish:latest
|
- name: publish:latest
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
|
environment:
|
||||||
|
DOCKER_BUILDKIT: 1
|
||||||
settings:
|
settings:
|
||||||
username:
|
username:
|
||||||
from_secret: DOCKERHUB_USERNAME
|
from_secret: DOCKERHUB_USERNAME
|
||||||
|
|
24
Dockerfile
24
Dockerfile
|
@ -17,12 +17,13 @@
|
||||||
# FROM nextcloud:27.1.3-apache
|
# FROM nextcloud:27.1.3-apache
|
||||||
# FROM nextcloud:27.1.4-apache
|
# FROM nextcloud:27.1.4-apache
|
||||||
# FROM nextcloud:28.0.1-apache
|
# FROM nextcloud:28.0.1-apache
|
||||||
FROM nextcloud:29.0.0-apache
|
FROM nextcloud:29.0.3-apache
|
||||||
|
|
||||||
# This is a stupid comment for a demo (remove later)
|
# This is a stupid comment for a demo (remove later)
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y clamdscan nano ghostscript \
|
&& apt-get install -y --no-install-recommends \
|
||||||
|
clamdscan nano ghostscript \
|
||||||
&& apt-get clean
|
&& apt-get clean
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -51,20 +52,25 @@ RUN apt-get update \
|
||||||
##
|
##
|
||||||
## GMP Support (for bookmark extension)
|
## GMP Support (for bookmark extension)
|
||||||
##
|
##
|
||||||
RUN apt-get update && apt-get install -y libgmp3-dev \
|
RUN apt-get update \
|
||||||
|
&& apt-get install -y --no-install-recommends \
|
||||||
|
libgmp3-dev \
|
||||||
&& docker-php-ext-install gmp
|
&& docker-php-ext-install gmp
|
||||||
|
|
||||||
##
|
##
|
||||||
## BZ2 Support (for nextcloud)
|
## BZ2 Support (for nextcloud)
|
||||||
##
|
##
|
||||||
RUN apt-get update && apt-get install -y libbz2-dev \
|
RUN apt-get update \
|
||||||
|
&& apt-get install -y --no-install-recommends \
|
||||||
|
libbz2-dev \
|
||||||
&& docker-php-ext-install bz2
|
&& docker-php-ext-install bz2
|
||||||
|
|
||||||
##
|
##
|
||||||
## SVG and LibreSign support
|
## SVG and LibreSign support
|
||||||
##
|
##
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update \
|
||||||
libmagickcore-6.q16-6-extra \
|
&& apt-get install -y --no-install-recommends \
|
||||||
|
libmagickcore-6.q16-6-extra \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN sed -i'' 's|.*<policy domain="coder".*"PDF".*|<policy domain="coder" rights="read \| write" pattern="PDF" />|g' \
|
RUN sed -i'' 's|.*<policy domain="coder".*"PDF".*|<policy domain="coder" rights="read \| write" pattern="PDF" />|g' \
|
||||||
|
@ -88,14 +94,14 @@ RUN echo '[opcache]' > /usr/local/etc/php/conf.d/opcache.ini \
|
||||||
RUN echo '*/5 * * * * php -d memory_limit=1024M -f /var/www/html/cron.php' \
|
RUN echo '*/5 * * * * php -d memory_limit=1024M -f /var/www/html/cron.php' \
|
||||||
> /var/spool/cron/crontabs/www-data
|
> /var/spool/cron/crontabs/www-data
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
supervisor \
|
supervisor \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
&& mkdir /var/log/supervisord /var/run/supervisord
|
&& mkdir /var/log/supervisord /var/run/supervisord
|
||||||
COPY supervisord.conf /etc/supervisord.conf
|
COPY supervisord.conf /etc/supervisord.conf
|
||||||
|
|
||||||
COPY app.json /app/app.json
|
COPY --chmod=755 ./postdeploy.sh /app/postdeploy.sh
|
||||||
COPY postdeploy.sh /app/postdeploy.sh
|
COPY --chmod=755 ./postdeploy_hook.sh /docker-entrypoint-hooks.d/post-installation/postdeploy_hook.sh
|
||||||
|
|
||||||
ENV NEXTCLOUD_UPDATE=1
|
ENV NEXTCLOUD_UPDATE=1
|
||||||
|
|
||||||
|
|
10
README.md
10
README.md
|
@ -18,3 +18,13 @@
|
||||||
* push image to local registry
|
* push image to local registry
|
||||||
4.
|
4.
|
||||||
|
|
||||||
|
ssh dokku@buddha-apps.boldcode.io app-json:set cloud appjson-path /app/app.json # glenux/service-nextcloud:latest
|
||||||
|
|
||||||
|
Run after install
|
||||||
|
|
||||||
|
config:app:set --value '30' files_lock lock_timeout
|
||||||
|
|
||||||
|
Add this in crontab
|
||||||
|
|
||||||
|
dokku enter cloud web su -l -s /bin/bash - www-data -c "cd html && php -dmemory_limit=-1 ./occ app:update --all"
|
||||||
|
|
||||||
|
|
7
app.json
7
app.json
|
@ -1,7 +0,0 @@
|
||||||
{
|
|
||||||
"scripts": {
|
|
||||||
"dokku": {
|
|
||||||
"postdeploy": "su -l -s /bin/sh www-data -c /app/postdeploy.sh"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,2 +1,15 @@
|
||||||
rewrite ^/\.well-known/carddav https://$server_name/remote.php/dav/ permanent;
|
location = /robots.txt {
|
||||||
rewrite ^/\.well-known/caldav https://$server_name/remote.php/dav/ permanent;
|
allow all;
|
||||||
|
log_not_found off;
|
||||||
|
access_log off;
|
||||||
|
}
|
||||||
|
|
||||||
|
location = /.well-known/carddav {
|
||||||
|
return 301 $scheme://$host/remote.php/dav;
|
||||||
|
}
|
||||||
|
|
||||||
|
location = /.well-known/caldav {
|
||||||
|
return 301 $scheme://$host/remote.php/dav;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /.well-known/acme-challenge { }
|
||||||
|
|
|
@ -3,14 +3,25 @@
|
||||||
set -u
|
set -u
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
cd /var/www/html
|
WORKDIR=/var/www/html
|
||||||
|
counter=0
|
||||||
|
while [ ! -d "$WORKDIR" ] && [ "$counter" -lt 120 ]; do
|
||||||
|
echo "GYR:POSTDEPLOY:WAITING"
|
||||||
|
counter=$((counter+1))
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
cd "$WORKDIR" || exit 1
|
||||||
|
|
||||||
echo "GYR:POSTDEPLOY:START ($(pwd))"
|
echo "GYR:POSTDEPLOY:START ($(pwd))"
|
||||||
find . -maxdepth 1
|
find . -maxdepth 1
|
||||||
php -d memory_limit=-1 occ maintenance:mode --on
|
echo "GYR:POSTDEPLOY:UPGRADE"
|
||||||
php -d memory_limit=-1 occ upgrade
|
php -d memory_limit=-1 occ upgrade
|
||||||
|
echo "GYR:POSTDEPLOY:DB"
|
||||||
php -d memory_limit=-1 occ db:convert-filecache-bigint
|
php -d memory_limit=-1 occ db:convert-filecache-bigint
|
||||||
php -d memory_limit=-1 occ db:add-missing-indices
|
php -d memory_limit=-1 occ db:add-missing-indices
|
||||||
|
echo "GYR:POSTDEPLOY:HTACCESS"
|
||||||
php -d memory_limit=-1 occ maintenance:update:htaccess
|
php -d memory_limit=-1 occ maintenance:update:htaccess
|
||||||
|
echo "GYR:POSTDEPLOY:MAINTENANCE:OFF"
|
||||||
php -d memory_limit=-1 occ maintenance:mode --off
|
php -d memory_limit=-1 occ maintenance:mode --off
|
||||||
php -d memory_limit=-1 occ maintenance:mode --off || true
|
php -d memory_limit=-1 occ maintenance:mode --off || true
|
||||||
echo "GYR:POSTDEPLOY:END"
|
echo "GYR:POSTDEPLOY:END"
|
||||||
|
|
4
postdeploy_hook.sh
Executable file
4
postdeploy_hook.sh
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
su -l -s /bin/sh www-data -c /app/postdeploy.sh
|
||||||
|
|
Loading…
Reference in a new issue