Compare commits
No commits in common. "e2e118358bbf5cb5f65dd14b8253a11464ce54bb" and "a40f479a8dec9726d501be39d764e0150c613168" have entirely different histories.
e2e118358b
...
a40f479a8d
8 changed files with 16 additions and 75 deletions
|
@ -41,9 +41,7 @@ steps:
|
||||||
from_secret: DOCKERHUB_USERNAME
|
from_secret: DOCKERHUB_USERNAME
|
||||||
password:
|
password:
|
||||||
from_secret: DOCKERHUB_PASSWORD
|
from_secret: DOCKERHUB_PASSWORD
|
||||||
cache_from:
|
cache_from: "glenux/service-nextcloud:latest_${DRONE_BRANCH/\\//-}"
|
||||||
- "glenux/service-nextcloud:${DRONE_COMMIT_SHA:0:8}"
|
|
||||||
- "glenux/service-nextcloud:latest_${DRONE_BRANCH/\\//-}"
|
|
||||||
repo: glenux/service-nextcloud
|
repo: glenux/service-nextcloud
|
||||||
tags: "latest_${DRONE_BRANCH/\\//-}"
|
tags: "latest_${DRONE_BRANCH/\\//-}"
|
||||||
purge: false
|
purge: false
|
||||||
|
@ -62,9 +60,7 @@ steps:
|
||||||
from_secret: DOCKERHUB_USERNAME
|
from_secret: DOCKERHUB_USERNAME
|
||||||
password:
|
password:
|
||||||
from_secret: DOCKERHUB_PASSWORD
|
from_secret: DOCKERHUB_PASSWORD
|
||||||
cache_from:
|
cache_from: "glenux/service-nextcloud:latest_${DRONE_BRANCH/\\//-}"
|
||||||
- "glenux/service-nextcloud:${DRONE_COMMIT_SHA:0:8}"
|
|
||||||
- "glenux/service-nextcloud:latest_${DRONE_BRANCH/\\//-}"
|
|
||||||
repo: glenux/service-nextcloud
|
repo: glenux/service-nextcloud
|
||||||
tags: latest
|
tags: latest
|
||||||
purge: false
|
purge: false
|
||||||
|
|
|
@ -100,10 +100,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
&& 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 --chmod=755 ./hooks/gx.post-installation.www.sh /app/gx.post-installation.www.sh
|
COPY --chmod=755 ./postdeploy.sh /app/postdeploy.sh
|
||||||
# COPY --chmod=755 ./hooks/gx.post-installation.root.sh /docker-entrypoint-hooks.d/post-installation/gx.post-installation.root.sh
|
COPY --chmod=755 ./postdeploy_hook.sh /docker-entrypoint-hooks.d/post-installation/postdeploy_hook.sh
|
||||||
|
|
||||||
COPY --chmod=755 ./hooks/gx.before-starting.www.sh /docker-entrypoint-hooks.d/before-starting/gx.before-starting.www.sh
|
|
||||||
|
|
||||||
ENV NEXTCLOUD_UPDATE=1
|
ENV NEXTCLOUD_UPDATE=1
|
||||||
|
|
||||||
|
|
8
Makefile
8
Makefile
|
@ -1,8 +0,0 @@
|
||||||
|
|
||||||
all:
|
|
||||||
|
|
||||||
build:
|
|
||||||
docker compose build
|
|
||||||
|
|
||||||
run:
|
|
||||||
docker compose up -d
|
|
|
@ -1,7 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -u
|
|
||||||
set -e
|
|
||||||
|
|
||||||
echo "== Running before-starting hooks as $(id -un) user =="
|
|
||||||
su -l -s /bin/sh www-data -c /app/gx.before-starting.www.sh
|
|
|
@ -1,8 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -u
|
|
||||||
set -e
|
|
||||||
|
|
||||||
echo "== Running post-installation hooks as $(id -un) user =="
|
|
||||||
su -l -s /bin/sh www-data -c /app/gx.post-installation.www.sh
|
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -u
|
|
||||||
set -e
|
|
||||||
|
|
||||||
echo "== Running post-installation hooks as $(id -un) user =="
|
|
||||||
|
|
||||||
# wait for nextcloud to be initialized
|
|
||||||
WORKDIR=/var/www/html
|
|
||||||
counter=0
|
|
||||||
while [ ! -d "$WORKDIR" ] && [ "$counter" -lt 120 ]; do
|
|
||||||
echo "GX:POST-INSTALLATION:WAITING"
|
|
||||||
counter=$((counter+1))
|
|
||||||
sleep 1
|
|
||||||
done
|
|
||||||
cd "$WORKDIR" || exit 1
|
|
||||||
|
|
||||||
echo "GX:POST-INSTALLATION:START ($(pwd))"
|
|
||||||
# # find . -maxdepth 1
|
|
||||||
# echo "GX:POST-INSTALLATION:UPGRADE"
|
|
||||||
# php -d memory_limit=-1 occ upgrade
|
|
||||||
# echo "GX:POST-INSTALLATION:DB"
|
|
||||||
# php -d memory_limit=-1 occ db:convert-filecache-bigint
|
|
||||||
# php -d memory_limit=-1 occ db:add-missing-indices
|
|
||||||
# echo "GX:POST-INSTALLATION:HTACCESS"
|
|
||||||
# php -d memory_limit=-1 occ maintenance:update:htaccess
|
|
||||||
# echo "GX:POST-INSTALLATION:MAINTENANCE:OFF"
|
|
||||||
# php -d memory_limit=-1 occ maintenance:mode --off
|
|
||||||
# php -d memory_limit=-1 occ maintenance:mode --off || true
|
|
||||||
echo "GX:POST-INSTALLATION:END"
|
|
||||||
|
|
|
@ -3,29 +3,26 @@
|
||||||
set -u
|
set -u
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
echo "== Running before-starting hooks as $(id -un) user =="
|
|
||||||
|
|
||||||
# wait for nextcloud to be initialized
|
|
||||||
WORKDIR=/var/www/html
|
WORKDIR=/var/www/html
|
||||||
counter=0
|
counter=0
|
||||||
while [ ! -d "$WORKDIR" ] && [ "$counter" -lt 120 ]; do
|
while [ ! -d "$WORKDIR" ] && [ "$counter" -lt 120 ]; do
|
||||||
echo "GX:BEFORE-STARTING:WAITING"
|
echo "GYR:POSTDEPLOY:WAITING"
|
||||||
counter=$((counter+1))
|
counter=$((counter+1))
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
cd "$WORKDIR" || exit 1
|
cd "$WORKDIR" || exit 1
|
||||||
|
|
||||||
echo "GX:BEFORE-STARTING:START ($(pwd))"
|
echo "GYR:POSTDEPLOY:START ($(pwd))"
|
||||||
# find . -maxdepth 1
|
find . -maxdepth 1
|
||||||
echo "GX:BEFORE-STARTING:UPGRADE"
|
echo "GYR:POSTDEPLOY:UPGRADE"
|
||||||
php -d memory_limit=-1 occ upgrade
|
php -d memory_limit=-1 occ upgrade
|
||||||
echo "GX:BEFORE-STARTING:DB"
|
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 "GX:BEFORE-STARTING:HTACCESS"
|
echo "GYR:POSTDEPLOY:HTACCESS"
|
||||||
php -d memory_limit=-1 occ maintenance:update:htaccess
|
php -d memory_limit=-1 occ maintenance:update:htaccess
|
||||||
echo "GX:BEFORE-STARTING:MAINTENANCE:OFF"
|
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 "GX:BEFORE-STARTING: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