Compare commits

..

No commits in common. "b17f8bd0323d9cf66da58d2abeda3145280ba441" and "117cdd2922997d5c4f7422634d971eebc1f2422d" have entirely different histories.

6 changed files with 19 additions and 56 deletions

View file

@ -22,8 +22,7 @@ FROM nextcloud:29.0.0-apache
# This is a stupid comment for a demo (remove later)
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
clamdscan nano ghostscript \
&& apt-get install -y clamdscan nano ghostscript \
&& apt-get clean
#
@ -52,25 +51,20 @@ RUN apt-get update \
##
## GMP Support (for bookmark extension)
##
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libgmp3-dev \
RUN apt-get update && apt-get install -y libgmp3-dev \
&& docker-php-ext-install gmp
##
## BZ2 Support (for nextcloud)
##
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libbz2-dev \
RUN apt-get update && apt-get install -y libbz2-dev \
&& docker-php-ext-install bz2
##
## SVG and LibreSign support
##
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libmagickcore-6.q16-6-extra \
RUN apt-get update && apt-get install -y \
libmagickcore-6.q16-6-extra \
&& rm -rf /var/lib/apt/lists/*
RUN sed -i'' 's|.*<policy domain="coder".*"PDF".*|<policy domain="coder" rights="read \| write" pattern="PDF" />|g' \
@ -94,14 +88,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' \
> /var/spool/cron/crontabs/www-data
RUN apt-get update && apt-get install -y --no-install-recommends \
RUN apt-get update && apt-get install -y \
supervisor \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir /var/log/supervisord /var/run/supervisord
COPY supervisord.conf /etc/supervisord.conf
COPY --chmod=755 ./postdeploy.sh /app/postdeploy.sh
COPY --chmod=755 ./postdeploy_hook.sh /docker-entrypoint-hooks.d/post-installation/postdeploy_hook.sh
COPY app.json /app/app.json
COPY postdeploy.sh /app/postdeploy.sh
ENV NEXTCLOUD_UPDATE=1

View file

@ -18,13 +18,3 @@
* push image to local registry
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 Normal file
View file

@ -0,0 +1,7 @@
{
"scripts": {
"dokku": {
"postdeploy": "su -l -s /bin/sh www-data -c /app/postdeploy.sh"
}
}
}

View file

@ -1,15 +1,2 @@
location = /robots.txt {
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 { }
rewrite ^/\.well-known/carddav https://$server_name/remote.php/dav/ permanent;
rewrite ^/\.well-known/caldav https://$server_name/remote.php/dav/ permanent;

View file

@ -3,25 +3,14 @@
set -u
set -e
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
cd /var/www/html
echo "GYR:POSTDEPLOY:START ($(pwd))"
find . -maxdepth 1
echo "GYR:POSTDEPLOY:UPGRADE"
php -d memory_limit=-1 occ maintenance:mode --on
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:add-missing-indices
echo "GYR:POSTDEPLOY: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 || true
echo "GYR:POSTDEPLOY:END"

View file

@ -1,4 +0,0 @@
#!/bin/sh
su -l -s /bin/sh www-data -c /app/postdeploy.sh