From f39f212e8a7514d952d98163b61020d1f073a17b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Erbsh=C3=A4u=C3=9Fer?= Date: Sun, 7 Jun 2026 15:14:35 +0200 Subject: [PATCH] add readme --- README.md | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..b43bf40 --- /dev/null +++ b/README.md @@ -0,0 +1,67 @@ +# tesoft website + +This repository contains the source code of the tesoft.dev website. + +The code is separated into a Go written backend and a Typescript frontend. +Both can be built together in a Docker/Podman image via the usual build +command: + +``` +podman build -t tesoft-website . +``` + +Once the image has been built, the website can be started as follows: + +``` +podman run -p 8080:80 \ + -e ROOT_PASSWORD=pwd \ + -v $(pwd):/db \ + -e DB_PATH=/db/tesoft-db.sqlite \ + tesoft-website +``` + +This command starts the website's web server on port 8080, sets the password to +`pwd` and stores the backend SQLite database in the current folder. + +The password environment variable is only required in the case when no database +exists, yet and should be omitted on future calls to increase security. + +Once the website is running the password can be used to upload and change blog +articles and to display a preview of unpublished articles. +To login on the webpage hit CTRL+ALT+P and type `login ` followed by the +password. Confirm with enter. + +Blog articles can either be managed using direct api calls or via the +[./tesoft.bash](tesoft.bash) helper script. +It supports the following operations: + +`tesoft.bash login` + +Asks for the password and performs a login. + +`tesoft.bash logout` + +Logout from the server. + +`tesoft.bash upload ./article-dir` + +Create a new blog article in draft state. The folder must contain at least a +`README.md` file that contains the article content. +The command prints the id of the created article. + +`tesoft.bash patch 123 ./aticle-dir` + +Changes a blog article with the given id. This does not change the article state. + +`tesoft.bash publish 123` + +Sets the state for the blog article with the given id to published. + +`tesoft.bash unpublish 123` + +Sets the state for the blog article with the given id to unpublished. + +`tesoft.bash drop 123` + +Deletes the blog article with the given id. +