From c78083d1ccceee376719d8a8b6010d0191308b6d Mon Sep 17 00:00:00 2001 From: tlg Date: Mon, 16 Mar 2026 09:24:52 +0100 Subject: [PATCH] Added "New Traefik route" in Linux-Servers.md --- Linux-Servers.md | 107 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) diff --git a/Linux-Servers.md b/Linux-Servers.md index 6eb43cc..ac78757 100644 --- a/Linux-Servers.md +++ b/Linux-Servers.md @@ -108,3 +108,110 @@ Change the SSL certificate setup so that future renewals will work. If not already done by completing the task before, repair the SSL connection so that "kipurchat.creature-go.com" can be used again. +--- + +# Podman shell script for AFFiNE service + +## Motivation + +A Podman Pod is needed on a Linux server which provides an AFFiNE service. +This Podman Pod needs to be created and started with a shell script which needs to be designed. + +The AFFiNE service will be used by humans and by AI agents; it will also be part of a design environment for designing a special MCP server for AFFiNE. + +## Shell script requirements + +Requirements for the shell script: +- Must use a container image with a Pinned Tag (for exact consistency) which points to the AFFiNE version 0.26.3. The name likely is something like "ghcr.io/toeverything/affine:0.26.3". +- Must provide the AFFiNE web user interface at port 8092. +- Must provide the GraphQL API. Background: The AFFiNE web and desktop apps use an internal GraphQL API to communicate with the backend. There is a /graphql endpoint but it is not documented for third-party use. +- Must be in folder /home/pln/bin. +- Must have the name create_pod_affine.sh + +The shell script shall be run by user pln which has permissions to run rootless pods. + +## Shell script style + +The needed shell script must have the same style as other shell scripts on the server. + +These files are examples: +/home/lwc/bin/create_pod_langflow.sh +/home/krt/bin/create_pod_qdrant.sh + +## Your tasks + +### Ask first + +Before starting to design the shell script, ask between two and five questions to fully understand the situation, your tasks and the objectives. + +### Identify the container image + +Find the container image with Pinned Tag pointing to AFFiNE version 0.26.3. + +### Write the shell script + +Write the shell script. + +### Test the shell script + +Run the shell script and test it. + +### Redesign if necessary + +If the test failed, understand the problem, improve the shell script and go back to Test the shell script. + +Repeat this in a loop up to five times. + +## Your objectives + +Your objectives are: +- All requirements are fulfilled. +- AFFiNE web user interface shows up at 127.0.0.1:8092. +- The AFFiNE GraphQL API shows up under 127.0.0.1:8092 at /graphql or another link. + +## Your behaviour + +If it is not possible to achieve your objectives, interrupt and ask me. + +Complete all your tasks without asking in between if you can achieve your objectives. + +--- + +# New Traefik route + +## Motivation + +A new service runs on the server and needs to be provided to the internet by installing a new Traefik route. + +## Traefik service + +Traefik runs as a systemd service in a Podman Pod. +To end the service and Pod, run `/home/trf/bin/remove_pod_systemd_services.sh`. +To start the Pod and the service, run `create_pod_traefik.sh`. + +## Traefik configuration + +The Traefik configuration directory is `/home/trf/.local/share/traefik/`. + +The main configuration file is `/home/trf/.local/share/traefik/traefik.yml`. +In the directory `/home/trf/.local/share/traefik/dynamic` are the .yml files for the individual routings. + +## New service + +The new service for which the new Traefik route is needed: +- Name is "affine" +- Provided at 127.0.0.1:8092 + +## Your tasks + +Your tasks are: +- Ask questions if necessary to understand the situation and the tasks below. +- Create the necessary file in `/home/trf/.local/share/traefik/dynamic`. +- Update `/home/trf/.local/share/traefik/traefik.yml`. + + +--- + + + +