mirror of https://gitlab.com/octtspacc/OcttKB
Manual push Sun Jul 23 12:21:07 CEST 2023
This commit is contained in:
parent
df03c620e3
commit
0cfc51da4e
13
Bootstrap.sh
13
Bootstrap.sh
|
@ -1,5 +1,10 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e # Exit on any error
|
set -e # Exit on any error
|
||||||
|
set -x # Echo all commands
|
||||||
|
|
||||||
|
# Configuration
|
||||||
|
WikiName="OcttKB"
|
||||||
|
WikiLoading="./Wiki-${WikiName}"
|
||||||
|
|
||||||
# Ensure important directories
|
# Ensure important directories
|
||||||
mkdir -vp ./Repo
|
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
|
# Export all tiddlers from the specific path of the HTML wiki
|
||||||
tiddlywiki \
|
tiddlywiki \
|
||||||
./Wiki-OcttKB \
|
${WikiLoading} \
|
||||||
--verbose \
|
--verbose \
|
||||||
--output ./Output.tmp \
|
--output ./Output.tmp \
|
||||||
--save "[prefix[$:/OcttKB/Repo/]]"
|
--save "[prefix[\$:/${WikiName}/Repo/]]"
|
||||||
|
|
||||||
# Move the exported folder to a better location
|
# 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)
|
# 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
|
# Don't filter for just .sh files anymore as we have other kinds of files
|
||||||
cd ./Repo.tmp
|
cd ./Repo.tmp
|
||||||
for File in *.txt
|
for File in *.txt
|
||||||
do
|
do
|
||||||
mv "$File" "${File/.txt}"
|
mv "${File}" "${File/.txt}"
|
||||||
done
|
done
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
created: 20230722232624533
|
||||||
|
creator: Octt
|
||||||
|
modified: 20230722232701023
|
||||||
|
modifier: Octt
|
||||||
|
tags:
|
||||||
|
title: Docker
|
||||||
|
|
||||||
|
<<^wikipediaframe "Docker (software)">>
|
||||||
|
|
|
@ -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]]
|
|
@ -35,9 +35,14 @@ do
|
||||||
cd "./${TypeDir}.tmp"
|
cd "./${TypeDir}.tmp"
|
||||||
for OldFile in *
|
for OldFile in *
|
||||||
do
|
do
|
||||||
Ext="$(echo "${OldFile}" | rev | cut -d"." -f1 | rev)"
|
#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' | rev | cut -d"." -f2- | rev)_.${Ext}"
|
||||||
#NewFile="$(echo "${OldFile}" | sed -e 's|_|/|g')"
|
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" = . ]
|
#[ "$(basename "${NewFile}") | cut -b1" = . ]
|
||||||
mkdir -p "../${TypeDir}/${NewFile}"
|
mkdir -p "../${TypeDir}/${NewFile}"
|
||||||
rm -rf "../${TypeDir}/${NewFile}"
|
rm -rf "../${TypeDir}/${NewFile}"
|
||||||
|
|
Loading…
Reference in New Issue