deploy: Use postdeploy script
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
26e64974c3
commit
7381845b87
3 changed files with 15 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
2
app.json
2
app.json
|
@ -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
13
postdeploy.sh
Executable 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"
|
||||
|
Loading…
Reference in a new issue