deploy: Use postdeploy script
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Glenn Y. Rolland 2023-02-26 01:08:17 +01:00
parent 26e64974c3
commit 7381845b87
3 changed files with 15 additions and 1 deletions

View file

@ -75,6 +75,7 @@ RUN apt-get update && apt-get install -y \
COPY supervisord.conf /etc/supervisord.conf
COPY app.json /app/app.json
COPY postdeploy.sh /app/postdeploy.sh
ENV NEXTCLOUD_UPDATE=1

View file

@ -1,7 +1,7 @@
{
"scripts": {
"dokku": {
"postdeploy": "sh -c 'echo GYR:POSTDEPLOY:START && pwd && find . -maxdepth 1 && php -d memory_limit=-1 occ upgrade && php -d memory_limit=-1 occ db:convert-filecache-bigint && php -d memory_limit=-1 occ db:add-missing-indices && echo GYR:POSTDEPLOY:END'"
"postdeploy": "su -l -s /bin/sh www-data -c /app/postdeploy.sh"
}
}
}

13
postdeploy.sh Executable file
View file

@ -0,0 +1,13 @@
#!/bin/sh
set -u
set -e
cd /var/www/html
echo "GYR:POSTDEPLOY:START ($(pwd))"
find . -maxdepth 1
php -d memory_limit=-1 occ upgrade
php -d memory_limit=-1 occ db:convert-filecache-bigint
php -d memory_limit=-1 occ db:add-missing-indices
echo "GYR:POSTDEPLOY:END"