Compare commits
No commits in common. "master" and "modernize" have entirely different histories.
2
.gitmodules
vendored
2
.gitmodules
vendored
@ -1,3 +1,3 @@
|
||||
[submodule "dokuwiki"]
|
||||
path = dokuwiki
|
||||
url = https://github.com/splitbrain/dokuwiki.git
|
||||
url = git://github.com/ndarilek/dokuwiki.git
|
||||
|
@ -1 +0,0 @@
|
||||
2020-07-29~2020-08-31
|
@ -13,8 +13,6 @@ if [ -f /opt/app/dokuwiki/composer.json ] ; then
|
||||
fi
|
||||
|
||||
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
|
||||
if [ ! -e $p.orig ]; then
|
||||
|
@ -1,7 +1,3 @@
|
||||
# 2020-07-29 (2020-09-01)
|
||||
|
||||
* Upgrade DokuWiki
|
||||
|
||||
# 2017-02-19b-sandstorm6 (2017-03-14)
|
||||
|
||||
* Upgrade DokuWiki
|
||||
|
@ -1,20 +1 @@
|
||||
DokuWiki is a simple to use and highly versatile Open Source wiki
|
||||
software that doesn't require a database. It is loved by users for its
|
||||
clean and readable syntax. The ease of maintenance, backup and integration
|
||||
makes it an administrator's favorite. The large number of plugins
|
||||
contributed by its vibrant community allow for a broad range of use cases
|
||||
beyond a traditional wiki.
|
||||
|
||||
## Sandstorm Upgrade Troubleshooting
|
||||
|
||||
If you've upgraded DokuWiki and are now getting PHP errors in your pages,
|
||||
you may have a plugin that needs to be upgraded or disabled.
|
||||
See if the script referenced in the error is in `plugins`. If it is:
|
||||
|
||||
* Try to disable or remove the plugin from the admin UI.
|
||||
* If you can't disable/remove the plugin via the admin:
|
||||
1. Download a backup of the grain
|
||||
2. Unzip the backup into a new folder
|
||||
3. Remove the plugin folder from the unzipped backup tree
|
||||
4. Rezip up the backup tree, preserving the same base folders
|
||||
5. Restore the grain from backup
|
||||
DokuWiki is a simple to use and highly versatile Open Source wiki software that doesn't require a database. It is loved by users for its clean and readable syntax. The ease of maintenance, backup and integration makes it an administrator's favorite. The large number of plugins contributed by its vibrant community allow for a broad range of use cases beyond a traditional wiki.
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
# 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/php/sessions
|
||||
mkdir -p /var/lib/php7.0/sessions
|
||||
mkdir -p /var/log
|
||||
mkdir -p /var/log/nginx
|
||||
mkdir -p /var/www
|
||||
@ -27,8 +27,6 @@ if [ ! -e /var/lib/dokuwiki/conf/local.php ]; then
|
||||
cp /opt/app/local.php /var/lib/dokuwiki/conf
|
||||
fi
|
||||
rm -f /var/lib/dokuwiki/conf/conf
|
||||
# sandstorm-specific things go here
|
||||
cp /opt/app/local.protected.php /var/lib/dokuwiki/conf
|
||||
|
||||
if [ ! -e /var/lib/dokuwiki/data ]; then
|
||||
echo Adding data.
|
||||
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -9,7 +9,7 @@ const pkgdef :Spk.PackageDefinition = (
|
||||
# The package definition. Note that the spk tool looks specifically for the
|
||||
# "pkgdef" constant.
|
||||
|
||||
id = "nx3dqcmz2sjjz939vkg4847vvxrzqsatqfjrt3ea50z3jac5kv7h",
|
||||
id = "s97k5f7mkzjtz6nn440cm2dyv5ay4p3aqaxumhp1mv2s5k35cfah",
|
||||
# Your app ID is actually its public key. The private key was placed in
|
||||
# your keyring. All updates must be signed with the same key.
|
||||
|
||||
@ -19,9 +19,9 @@ const pkgdef :Spk.PackageDefinition = (
|
||||
|
||||
appTitle = (defaultText = "DokuWiki"),
|
||||
|
||||
appVersion = 10, # Increment this for every release.
|
||||
appVersion = 5, # Increment this for every release.
|
||||
|
||||
appMarketingVersion = (defaultText = (embed "app-marketing-version")),
|
||||
appMarketingVersion = (defaultText = "2017-02-19b-sandstorm6"),
|
||||
# Human-readable representation of appVersion. Should match the way you
|
||||
# identify versions of your app in documentation and marketing.
|
||||
|
||||
@ -57,7 +57,7 @@ const pkgdef :Spk.PackageDefinition = (
|
||||
website = "http://dokuwiki.org",
|
||||
# This should be the app's main website url.
|
||||
|
||||
codeUrl = "https://github.com/johnbintz/dokuwiki-sandstorm",
|
||||
codeUrl = "https://github.com/ndarilek/dokuwiki-sandstorm",
|
||||
# URL of the app's source code repository, e.g. a GitHub URL.
|
||||
# Required if you specify a license requiring redistributing code, but optional otherwise.
|
||||
|
||||
@ -73,7 +73,7 @@ const pkgdef :Spk.PackageDefinition = (
|
||||
author = (
|
||||
# Fields relating to the author of this app.
|
||||
|
||||
contactEmail = "sandstorm@leapingsheepfarm.com",
|
||||
contactEmail = "nolan@thewordnerd.info",
|
||||
# Email address to contact for any issues with this app. This includes end-user support
|
||||
# requests as well as app store administrator requests, so it is very important that this be a
|
||||
# valid address with someone paying attention to it.
|
||||
|
@ -21,6 +21,7 @@ http {
|
||||
default_type application/octet-stream;
|
||||
|
||||
# Logging
|
||||
access_log off;
|
||||
error_log stderr;
|
||||
|
||||
# Prevent nginx from adding compression; this interacts badly with Sandstorm
|
||||
@ -37,8 +38,6 @@ http {
|
||||
listen 8000 default_server;
|
||||
listen [::]:8000 default_server ipv6only=on;
|
||||
|
||||
access_log /var/log/nginx/access.log;
|
||||
|
||||
# Allow arbitrarily large bodies - Sandstorm can handle them, and requests
|
||||
# are authenticated already, so there's no reason for apps to add additional
|
||||
# limits by default.
|
||||
@ -48,8 +47,6 @@ http {
|
||||
root /opt/app/dokuwiki;
|
||||
index doku.php;
|
||||
|
||||
error_page 500 ../500.html;
|
||||
|
||||
location ~ /(data/|conf/|bin/|inc/|install.php) { deny all; }
|
||||
|
||||
location / {
|
||||
@ -69,7 +66,6 @@ http {
|
||||
fastcgi_pass unix:/var/run/php-fpm7.0.sock;
|
||||
fastcgi_param REDIRECT_STATUS 200;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_intercept_errors on;
|
||||
}
|
||||
|
||||
}
|
||||
|
41
500.html
41
500.html
@ -1,41 +0,0 @@
|
||||
<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>
|
67
README.md
67
README.md
@ -1,67 +0,0 @@
|
||||
# DokuWiki Sandstorm
|
||||
|
||||
_Use [this fork](https://github.com/ocdtrekkie/dokuwiki-sandstorm) of the project instead!_
|
||||
|
||||
Run [DokuWiki](https://www.dokuwiki.org/dokuwiki) on [Sandstorm](https://sandstorm.io/).
|
||||
A lightweight wiki for your personal use.
|
||||
|
||||
## Details
|
||||
|
||||
* Runs in PHP 7 using PHP-FPM and an Nginx reverse proxy
|
||||
* Uses Sandstorm authentication
|
||||
|
||||
### Sandstorm Upgrades
|
||||
|
||||
_(last updated 2020-09-01)_
|
||||
|
||||
The version in the app store is far behind the current releases of
|
||||
DokuWiki. In order to minimize the amount of hassle with getting Sandstorm's
|
||||
DokuWiki up to date with modern DokuWiki, new releases will be rolled out every
|
||||
two or so weeks, giving existing Sandstorm users enough time to clean up
|
||||
potentially conflicting plugins and other modifications, which will cause the
|
||||
most issues when upgrading.
|
||||
|
||||
The release plan follows the recommended versions as shown on
|
||||
the [Download DokuWiki](https://download.dokuwiki.org/) page,
|
||||
and will be updated as new releases are available in the [App Store](https://apps.sandstorm.io/).
|
||||
|
||||
* Previous: 2017-02-19b
|
||||
* Previous: 2017-02-19g (old stable)
|
||||
* [Currently in App Store](https://apps.sandstorm.io/app/nx3dqcmz2sjjz939vkg4847vvxrzqsatqfjrt3ea50z3jac5kv7h): 2018-04-22c (stable)
|
||||
* Next: 2020-07-29 (recommended version)
|
||||
|
||||
Once 2020-07-29 has been in the App Store for a few weeks, this section of the
|
||||
README will be removed and updates will happen normally.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### PHP errors in the page, especially after upgrades
|
||||
|
||||
You may have a plugin that needs to be upgraded or disabled.
|
||||
See if the script referenced in the error is in `plugins`.
|
||||
|
||||
* Try to disable or remove the plugin from the admin UI.
|
||||
* If you can't disable/remove the plugin via the admin:
|
||||
1. Download a backup of the grain
|
||||
2. Unzip the backup into a new folder
|
||||
3. Remove the plugin folder from the unzipped backup tree
|
||||
4. Rezip up the backup tree, preserving the same base folders
|
||||
5. Restore the grain from backup
|
||||
|
||||
## Building a new version
|
||||
|
||||
### Requirements
|
||||
|
||||
* git
|
||||
* VirtualBox
|
||||
* Vagrant
|
||||
* [vagrant-spk](https://docs.sandstorm.io/en/latest/vagrant-spk/installation/)
|
||||
|
||||
### Setup & Commands
|
||||
|
||||
```
|
||||
git submodule init
|
||||
git submodule update
|
||||
bin/upgrade_dokuwiki <target git tag from https://github.com/splitbrain/dokuwiki>
|
||||
# follow the directions echoed from the script
|
||||
```
|
@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd dokuwiki
|
||||
git reset --hard
|
||||
git clean -dxf
|
||||
find . -name '*.orig' -exec rm -Rf {} \;
|
||||
|
||||
echo "Dokuwiki cleaned up for another build attempt"
|
@ -1,50 +0,0 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
require 'time'
|
||||
|
||||
system("bin/cleanup_dokuwiki")
|
||||
|
||||
tag = ARGV[0]
|
||||
|
||||
unless tag
|
||||
puts "Usage: #{$0} <tag>"
|
||||
|
||||
exit 1
|
||||
end
|
||||
|
||||
Dir.chdir "dokuwiki" do
|
||||
system("git fetch")
|
||||
system("git checkout #{tag}")
|
||||
|
||||
if $? != 0
|
||||
puts "Tag not found!"
|
||||
exit 1
|
||||
end
|
||||
end
|
||||
|
||||
puts "#{tag} exists, updating files"
|
||||
|
||||
today = Time.now.strftime('%Y-%m-%d')
|
||||
version = tag.gsub(/^release_(stable|candidate)_/, '')
|
||||
|
||||
File.open('.sandstorm/app-marketing-version', 'w') { |fh| fh.puts "#{version}~#{today}" }
|
||||
|
||||
lines = File.readlines('.sandstorm/sandstorm-pkgdef.capnp')
|
||||
|
||||
lines = lines.map do |line|
|
||||
next line unless line['appVersion']
|
||||
|
||||
line.gsub(/= ([0-9]+),/) { |m| "= #{$1.to_i + 1}," }
|
||||
end
|
||||
|
||||
File.open('.sandstorm/sandstorm-pkgdef.capnp', 'w') { |fh| fh.print lines.join }
|
||||
|
||||
puts "Now:"
|
||||
puts
|
||||
puts "vagrant-spk vm destroy"
|
||||
puts "vagrant-spk vm up"
|
||||
puts "vagrant-spk dev to Test locally"
|
||||
puts "vagrant-spk pack ../dokuwiki-sandstorm-#{version}.pkg"
|
||||
puts "Test upgrade"
|
||||
puts "vagrant-spk publish ../dokuwiki-sandstorm-#{version}.pkg"
|
||||
|
2
dokuwiki
2
dokuwiki
@ -1 +1 @@
|
||||
Subproject commit 096f04eff7aad873454dc31dfd0c594ceaa5b3af
|
||||
Subproject commit d3d13e525967aac5b41c37f6ed7b1a5dcb30fb78
|
10
local.php
10
local.php
@ -9,3 +9,13 @@
|
||||
*/
|
||||
|
||||
$conf['showuseras'] = 'username';
|
||||
$conf['useacl'] = 1; //Use Access Control Lists to restrict access?
|
||||
$conf['autopasswd'] = 0; //autogenerate passwords and email them to user
|
||||
$conf['authtype'] = 'sandstorm'; //which authentication backend should be used
|
||||
$conf['superuser'] = '@admin'; //The admin can be user or @group or comma separated list user1,@group1,user2
|
||||
$conf['manager'] = '@manager'; //The manager can be user or @group or comma separated list user1,@group1,user2
|
||||
$conf['profileconfirm'] = 0; //Require current password to confirm changes to user profile
|
||||
$conf['disableactions']='login';
|
||||
$conf['userewrite'] = 1; //this makes nice URLs: 0: off 1: .htaccess 2: internal
|
||||
$conf['useslash'] = 1; //use slash instead of colon? only when rewrite is on
|
||||
$conf['savedir'] = '/var/lib/dokuwiki/data'; //where to store all the files
|
||||
|
@ -1,21 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* This is an example of how a local.php could look like.
|
||||
* Simply copy the options you want to change from dokuwiki.php
|
||||
* to this file and change them.
|
||||
*
|
||||
* When using the installer, a correct local.php file be generated for
|
||||
* you automatically.
|
||||
*/
|
||||
|
||||
$conf['autopasswd'] = 0; //autogenerate passwords and email them to user
|
||||
$conf['authtype'] = 'sandstorm'; //which authentication backend should be used
|
||||
$conf['superuser'] = '@admin'; //The admin can be user or @group or comma separated list user1,@group1,user2
|
||||
$conf['manager'] = '@manager'; //The manager can be user or @group or comma separated list user1,@group1,user2
|
||||
$conf['profileconfirm'] = 0; //Require current password to confirm changes to user profile
|
||||
$conf['disableactions']='login';
|
||||
$conf['userewrite'] = 1; //this makes nice URLs: 0: off 1: .htaccess 2: internal
|
||||
$conf['useslash'] = 1; //use slash instead of colon? only when rewrite is on
|
||||
$conf['useacl'] = 1; //Use Access Control Lists to restrict access?
|
||||
$conf['savedir'] = '/var/lib/dokuwiki/data'; //where to store all the files
|
||||
$conf['target']['extern'] = '_blank'; // always open external links in a new window
|
@ -1,4 +0,0 @@
|
||||
<?php
|
||||
ini_set('display_errors', '1');
|
||||
ini_set('display_startup_errors', '1');
|
||||
error_reporting(E_ALL);
|
Loading…
Reference in New Issue
Block a user