deploy: Use postdeploy script
continuous-integration/drone/push Build is passing Details

master
Glenn 3 months ago
parent 26e64974c3
commit 7381845b87

@ -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

@ -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"
}
}
}

@ -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"
Loading…
Cancel
Save