Slow upgrades #1

Merged
johnbintz merged 4 commits from slow-upgrades into master 2020-06-13 22:04:16 +00:00
12 changed files with 105 additions and 2339 deletions
Showing only changes of commit 84e063e22d - Show all commits

2
.gitmodules vendored
View File

@ -1,3 +1,3 @@
[submodule "dokuwiki"] [submodule "dokuwiki"]
path = dokuwiki path = dokuwiki
url = git://github.com/ndarilek/dokuwiki.git url = https://github.com/splitbrain/dokuwiki.git

View File

@ -13,6 +13,8 @@ if [ -f /opt/app/dokuwiki/composer.json ] ; then
fi fi
rsync -a /opt/app/plugin/ /opt/app/dokuwiki/lib/plugins/sandstorm/ rsync -a /opt/app/plugin/ /opt/app/dokuwiki/lib/plugins/sandstorm/
cp /opt/app/500.html /opt/app/dokuwiki/
cp /opt/app/preload.php /opt/app/dokuwiki/inc/
for p in /opt/app/dokuwiki/{conf,data,lib/plugins,lib/tpl}; do for p in /opt/app/dokuwiki/{conf,data,lib/plugins,lib/tpl}; do
if [ ! -e $p.orig ]; then if [ ! -e $p.orig ]; then

View File

@ -2,7 +2,7 @@
# Create a bunch of folders under the clean /var that php and nginx expect to exist # Create a bunch of folders under the clean /var that php and nginx expect to exist
mkdir -p /var/lib/nginx mkdir -p /var/lib/nginx
mkdir -p /var/lib/php7.0/sessions mkdir -p /var/lib/php/sessions
mkdir -p /var/log mkdir -p /var/log
mkdir -p /var/log/nginx mkdir -p /var/log/nginx
mkdir -p /var/www mkdir -p /var/www

File diff suppressed because it is too large Load Diff

View File

@ -19,9 +19,9 @@ const pkgdef :Spk.PackageDefinition = (
appTitle = (defaultText = "DokuWiki"), appTitle = (defaultText = "DokuWiki"),
appVersion = 5, # Increment this for every release. appVersion = 7, # Increment this for every release.
appMarketingVersion = (defaultText = "2017-02-19b-sandstorm6"), appMarketingVersion = (defaultText = "2017-02-19g~2020-06-13"),
# Human-readable representation of appVersion. Should match the way you # Human-readable representation of appVersion. Should match the way you
# identify versions of your app in documentation and marketing. # identify versions of your app in documentation and marketing.

View File

@ -21,7 +21,6 @@ http {
default_type application/octet-stream; default_type application/octet-stream;
# Logging # Logging
access_log off;
error_log stderr; error_log stderr;
# Prevent nginx from adding compression; this interacts badly with Sandstorm # Prevent nginx from adding compression; this interacts badly with Sandstorm
@ -38,6 +37,8 @@ http {
listen 8000 default_server; listen 8000 default_server;
listen [::]:8000 default_server ipv6only=on; listen [::]:8000 default_server ipv6only=on;
access_log /var/log/nginx/access.log;
# Allow arbitrarily large bodies - Sandstorm can handle them, and requests # Allow arbitrarily large bodies - Sandstorm can handle them, and requests
# are authenticated already, so there's no reason for apps to add additional # are authenticated already, so there's no reason for apps to add additional
# limits by default. # limits by default.
@ -47,6 +48,8 @@ http {
root /opt/app/dokuwiki; root /opt/app/dokuwiki;
index doku.php; index doku.php;
error_page 500 ../500.html;
location ~ /(data/|conf/|bin/|inc/|install.php) { deny all; } location ~ /(data/|conf/|bin/|inc/|install.php) { deny all; }
location / { location / {
@ -66,6 +69,7 @@ http {
fastcgi_pass unix:/var/run/php-fpm7.0.sock; fastcgi_pass unix:/var/run/php-fpm7.0.sock;
fastcgi_param REDIRECT_STATUS 200; fastcgi_param REDIRECT_STATUS 200;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors on;
} }
} }

41
500.html Normal file
View File

@ -0,0 +1,41 @@
<html>
<head><title>Uh oh, a plugin might be failing...</title></head>
<body>
<h1>Uh oh, a plugin might be failing...</h1>
<p>
You might have a plugin that's failing. If you installed any
custom plugins manually, they may not function correctly with
this version of DokuWiki. You should look in they
Grain Log for this grain to examine the errors from PHP-FPM.
If the issue is in plugin code, you'll have to remove the plugin manually
from the grain's filestructure via backup and restore.
You can then try installing a new version of the plugin, or find
a different one with better compatibility.
</p>
<h2>To fix a plugin issue:</h2>
<ol>
<li>Download a Backup of the grain.</li>
<li>Unzip the grain archive.</li>
<li>
Find the plugin that the error is referring to in
the <code>data/lib/dokiwiki/lib/plugins</code> folder and remove the
plugin's folder.
</li>
<li>
Zip up the unzipped grain archive, taking care to
preserve the same root files/folders as the original
Zip file.
</li>
<li>
Restore the grain from backup using the new Zip file.
</li>
<li>
Run the new grain. If it's working again, great!
If not, see if the error is still with plugins that
need removal/upgrading.
</li>
</ol>
</body>
</html>

8
README.md Normal file
View File

@ -0,0 +1,8 @@
# DokuWiki Sandstorm
## Building a new version
```
bin/upgrade_dokuwiki <target git tag from https://github.com/splitbrain/dokuwiki>
# follow the directions
```

8
bin/cleanup_dokuwiki Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
cd dokuwiki
git reset --hard
git clean -dxf
find . -name '*.orig' -exec rm -Rf {} \;
echo "Dokuwiki cleaned up for another build attempt"

22
bin/upgrade_dokuwiki Executable file
View File

@ -0,0 +1,22 @@
#!/bin/bash
bin/cleanup_dokuwiki
cd dokuwiki
git fetch
git checkout $1
if [ $? -ne 0 ]; then
echo "Tag not found!"
exit 1
fi
cd ..
echo "Now:"
echo
echo "vagrant-spk vm destroy"
echo "vagrant-spk vm up"
echo "Test locally"
echo "vagrant-spk pack ../dokuwiki-sandstorm-$1.pkg"
echo "Test upgrade"
echo "vagrant-spk publish ../dokuwiki-sandstorm-$1.pkg"

@ -1 +1 @@
Subproject commit d3d13e525967aac5b41c37f6ed7b1a5dcb30fb78 Subproject commit a5690a8c536c2fc9bdb8871714c9978ea2c19c98

4
preload.php Normal file
View File

@ -0,0 +1,4 @@
<?php
ini_set('display_errors', '1');
ini_set('display_startup_errors', '1');
error_reporting(E_ALL);