Browse Source

update dokuwiki

pull/4/head
Fanch 1 year ago
parent
commit
4d374adfca
  1. 10
      dockers/dokuwiki/Dockerfile
  2. 23
      dockers/dokuwiki/download.sh
  3. 58
      dockers/dokuwiki/first.sh
  4. BIN
      dockers/dokuwiki/wiki-conf/favicon.ico
  5. BIN
      dockers/dokuwiki/wiki-conf/logo.png

10
dockers/dokuwiki/Dockerfile

@ -12,11 +12,11 @@ LABEL maintainer="CrazyMax"
COPY .dummy .apt-mirror-confi[g] .proxy-confi[g] /
RUN cp /.proxy-config /etc/profile.d/proxy.sh 2> /dev/null || true
RUN if [ -f /.apt-mirror-config ] ; then . /.apt-mirror-config && sed -i \
-e "s/deb.debian.org/${APT_MIRROR_DEBIAN}/g" \
-e "s/security.debian.org/${APT_MIRROR_DEBIAN_SECURITY}/g" \
-e "s/archive.ubuntu.com/${APT_MIRROR_UBUNTU}/g" \
-e "s/security.ubuntu.com/${APT_MIRROR_UBUNTU_SECURITY}/g" \
/etc/apt/sources.list; fi
-e "s%s\?://deb.debian.org%://${APT_MIRROR_DEBIAN}%g" \
-e "s%s\?://security.debian.org%://${APT_MIRROR_DEBIAN_SECURITY}%g" \
-e "s%s\?://archive.ubuntu.com%://${APT_MIRROR_UBUNTU}%g" \
-e "s%s\?://security.ubuntu.com%://${APT_MIRROR_UBUNTU_SECURITY}%g" \
/etc/apt/sources.list; fi
########################################
RUN apk --update --no-cache add \

23
dockers/dokuwiki/download.sh

@ -5,24 +5,15 @@ KAZ_ROOT=$(cd $(dirname $0)/../..; pwd)
. "${KAZ_ROOT}/bin/.commonFunctions.sh"
setKazVars
downloadFile () {
# $1 new filename
# $2 URL to download
if [ ! -f "$1" ]; then
printKazMsg " - load $1"
curl -L -o "$1" "$2"
fi
}
mkdir -p "${KAZ_DNLD_DIR}/dokuwiki"
cd "${KAZ_DNLD_DIR}/dokuwiki"
printKazMsg "\n *** Download dokuwiki on ${KAZ_DNLD_DIR}"
downloadFile captcha.zip https://github.com/splitbrain/dokuwiki-plugin-captcha/zipball/master
downloadFile ckgedit.zip https://github.com/turnermm/ckgedit/archive/current.zip
downloadFile smtp.zip https://github.com/splitbrain/dokuwiki-plugin-smtp/zipball/master
downloadFile todo.zip https://github.com/leibler/dokuwiki-plugin-todo/archive/stable.zip
downloadFile wrap.zip https://github.com/selfthinker/dokuwiki_plugin_wrap/archive/stable.zip
downloadFile wrapadd.zip http://github.com/practical-solutions/dokuwiki-plugin-wrapadd/zipball/master
downloadFile docnavwiki.zip https://github.com/Vincent31Fr/docnavwiki-template/zipball/master
downloadFile https://github.com/splitbrain/dokuwiki-plugin-captcha/zipball/master captcha.zip
downloadFile https://github.com/turnermm/ckgedit/archive/current.zip ckgedit.zip
downloadFile https://github.com/splitbrain/dokuwiki-plugin-smtp/zipball/master smtp.zip
downloadFile https://github.com/leibler/dokuwiki-plugin-todo/archive/stable.zip todo.zip
downloadFile https://github.com/selfthinker/dokuwiki_plugin_wrap/archive/stable.zip wrap.zip
downloadFile http://github.com/practical-solutions/dokuwiki-plugin-wrapadd/zipball/master wrapadd.zip
downloadFile https://github.com/Vincent31Fr/docnavwiki-template/zipball/master docnavwiki.zip

58
dockers/dokuwiki/first.sh

@ -6,61 +6,5 @@ setKazVars
cd $(dirname $0)
. "${DOCKERS_ENV}"
. ${KAZ_KEY_DIR}/SetAllPass.sh
ORGA="Kaz"
TPL_DIR="${DOCK_VOL}/dokuwiki_dokuwikiLibtpl/_data"
PLG_DIR="${DOCK_VOL}/dokuwiki_dokuwikiPlugins/_data"
CONF_DIR="${DOCK_VOL}/dokuwiki_dokuwikiConf/_data"
DNLD_DIR="${KAZ_DNLD_DIR}/dokuwiki"
DockerServName="${dokuwikiServName}"
WIKI_URL="${httpProto}://${dokuwikiHost}.${domain}"
WIKI_TITLE=Kaz
WIKI_ROOT=Kaz
WIKI_EMAIL=wiki@kaz.local
WIKI_PASS=azerty
if ! [[ "$(docker ps -f name=${DockerServName} | grep -w ${DockerServName})" ]]; then
printKazError "Dokuwiki not running... abort"
exit
fi
if [ ! -f "${CONF_DIR}/local.php" ] ; then
printKazMsg "\n *** Premier lancement de Dokuwiki"
waitUrl "${WIKI_URL}"
curl -X POST \
-d "l=fr" \
-d "d[title]=${WIKI_TITLE}" \
-d "d[acl]=true" \
-d "d[superuser]=${WIKI_ROOT}" \
-d "d[fullname]=Admin"\
-d "d[email]=${WIKI_EMAIL}" \
-d "d[password]=${WIKI_PASS}" \
-d "d[confirm]=${WIKI_PASS}" \
-d "d[policy]=1" \
-d "d[allowreg]=false" \
-d "d[license]=lic_0" \
-d "d[pop]=false" \
"${WIKI_URL}/install.php"
cd wiki-conf
# XXX initialiser admin:<pass>:admin:<mel>:admin,user
rsync -auHAX local.php users.auth.php acl.auth.php "${CONF_DIR}/"
chown -R www-data: "${CONF_DIR}/"
sed -i -e "s|\(.*conf\['title'\].*=.*'\).*';|\1${ORGA}';|g" "${CONF_DIR}/local.php"
sed -i -e "s|\(.*conf\['lang'\].*=.*'\)en';|\1fr';|g" "${CONF_DIR}/dokuwiki.php"
fi
unzipInDir "${DNLD_DIR}/docnavwiki.zip" "${TPL_DIR}/"
chown -R www-data: "${TPL_DIR}/"
for plugin in captcha ckgedit smtp todo wrap wrapadd; do
unzipInDir "${DNLD_DIR}/${plugin}.zip" "${PLG_DIR}"
done
chown -R www-data: "${PLG_DIR}/"
"${KAZ_BIN_DIR}/initWiki.sh"

BIN
dockers/dokuwiki/wiki-conf/favicon.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

BIN
dockers/dokuwiki/wiki-conf/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Loading…
Cancel
Save