From 0cfc51da4e3846fec1b71d6aab4ccfbaaeb3a32a Mon Sep 17 00:00:00 2001 From: octospacc Date: Sun, 23 Jul 2023 12:21:08 +0200 Subject: [PATCH] Manual push Sun Jul 23 12:21:07 CEST 2023 --- Bootstrap.sh | 13 ++++-- Wiki-OcttKB/tiddlers/Normal/Docker.tid | 9 ++++ .../Installing kbin on Alpine Linux.tid | 41 +++++++++++++++++++ .../$/OcttKB/Repo/GitLab.CrossRepoSync.sh.txt | 11 +++-- 4 files changed, 67 insertions(+), 7 deletions(-) create mode 100644 Wiki-OcttKB/tiddlers/Normal/Docker.tid create mode 100644 Wiki-OcttKB/tiddlers/Normal/Installing kbin on Alpine Linux.tid diff --git a/Bootstrap.sh b/Bootstrap.sh index 2b95c77..6de4eff 100755 --- a/Bootstrap.sh +++ b/Bootstrap.sh @@ -1,5 +1,10 @@ #!/bin/bash set -e # Exit on any error +set -x # Echo all commands + +# Configuration +WikiName="OcttKB" +WikiLoading="./Wiki-${WikiName}" # Ensure important directories mkdir -vp ./Repo @@ -7,20 +12,20 @@ rm -rf ./Repo.tmp ./Output.tmp || true # Export all tiddlers from the specific path of the HTML wiki tiddlywiki \ - ./Wiki-OcttKB \ + ${WikiLoading} \ --verbose \ --output ./Output.tmp \ - --save "[prefix[$:/OcttKB/Repo/]]" + --save "[prefix[\$:/${WikiName}/Repo/]]" # Move the exported folder to a better location -mv ./Output.tmp/\$_/OcttKB/Repo ./Repo.tmp +mv "./Output.tmp/\$_/${WikiName}/Repo" ./Repo.tmp # Rename all extracted file to have a correct extension (remove forced .txt suffix) # Don't filter for just .sh files anymore as we have other kinds of files cd ./Repo.tmp for File in *.txt do - mv "$File" "${File/.txt}" + mv "${File}" "${File/.txt}" done cd .. diff --git a/Wiki-OcttKB/tiddlers/Normal/Docker.tid b/Wiki-OcttKB/tiddlers/Normal/Docker.tid new file mode 100644 index 0000000..c4c38e2 --- /dev/null +++ b/Wiki-OcttKB/tiddlers/Normal/Docker.tid @@ -0,0 +1,9 @@ +created: 20230722232624533 +creator: Octt +modified: 20230722232701023 +modifier: Octt +tags: +title: Docker + +<<^wikipediaframe "Docker (software)">> + diff --git a/Wiki-OcttKB/tiddlers/Normal/Installing kbin on Alpine Linux.tid b/Wiki-OcttKB/tiddlers/Normal/Installing kbin on Alpine Linux.tid new file mode 100644 index 0000000..29ce47d --- /dev/null +++ b/Wiki-OcttKB/tiddlers/Normal/Installing kbin on Alpine Linux.tid @@ -0,0 +1,41 @@ +created: 20230722230918717 +creator: Octt +modified: 20230722232602006 +modifier: Octt +tags: WIP +title: Installing kbin on Alpine Linux + +As of today, spring-summer 2023, it's quite tricky to install kbin without Docker (not that it's better with Docker). + +[[On the kbin wiki, a detailed bare-metal installation procedure|https://codeberg.org/Kbin/kbin-core/wiki/Admin-Bare-Metal-Guide]] is now available, but it both tells too much, and not enough to solve some subtle issues. + +Following instructions for installation are assembled by me for my experimental, private install use cases. They will be updated as I, with a group of other people, work to deploy a production kbin instance. + +Following resources have helped me compile these notes: + +* (Created by me) [[Issue #2: Database errors when trying to run without Docker|https://codeberg.org/Kbin/kbin-core/issues/2]] + other issues +* [[Issue #186: 500 Internal Server Error when searching for memes@lemmy.ml|https://codeberg.org/Kbin/kbin-core/issues/186]] +* Thinking, trying, and reporting results in various chatrooms + +!!! Installing core dependencies + +symfony, composer, php82, a lot of modules, and kbin itself + +... + +```sh +git clone --depth=1 https://codeberg.org/Kbin/kbin-core +... +``` + +... + +!!! Installing side services + +PostgreSQL and Redis are mandatory + +... + +... + +Reminder: reading this issue might help: [[Federation works only partially - Configuration Issue?|https://codeberg.org/Kbin/kbin-core/issues/73]] diff --git a/Wiki-OcttKB/tiddlers/System/$/OcttKB/Repo/GitLab.CrossRepoSync.sh.txt b/Wiki-OcttKB/tiddlers/System/$/OcttKB/Repo/GitLab.CrossRepoSync.sh.txt index 14ef9b3..79b49ad 100644 --- a/Wiki-OcttKB/tiddlers/System/$/OcttKB/Repo/GitLab.CrossRepoSync.sh.txt +++ b/Wiki-OcttKB/tiddlers/System/$/OcttKB/Repo/GitLab.CrossRepoSync.sh.txt @@ -35,9 +35,14 @@ do cd "./${TypeDir}.tmp" for OldFile in * do - Ext="$(echo "${OldFile}" | rev | cut -d"." -f1 | rev)" - NewFile="$(echo "${OldFile}" | sed -e 's|_|/|g' | rev | cut -d"." -f2- | rev)_.${Ext}" - #NewFile="$(echo "${OldFile}" | sed -e 's|_|/|g')" + #Ext="$(echo "${OldFile}" | rev | cut -d"." -f1 | rev)" + #NewFile="$(echo "${OldFile}" | sed -e 's|_|/|g' | rev | cut -d"." -f2- | rev)_.${Ext}" + NewPath="$(echo "${OldFile}" | sed -e 's|_|/|g')" + NewName="$(basename "${NewPath}")" + NewParent="$(echo "${NewPath}" | rev | cut -d"/" -f2- | rev)" + { [ "${NewPath}" = "${NewName}" ] && [ "${NewPath}" = "${NewParent}" ] ;} \ + && NewFile="_${NewPath}" \ + || NewFile="${NewParent}/_${NewName}" #[ "$(basename "${NewFile}") | cut -b1" = . ] mkdir -p "../${TypeDir}/${NewFile}" rm -rf "../${TypeDir}/${NewFile}"