5.8 KiB
5.8 KiB
Test Pi inventory (read-only answer from session "Pi-Main - Server", 2026-11-06)
Source: INVENTARIS.md in /home/claude/server-ops plus a live check on 2026-11-06. The session has no sudo, so root-only items are "not seen". No secrets are included. Facts below are as reported, not verified by this session.
How SlpSoftware is deployed today (the pattern to copy)
- User
gitea-workflow(uid 1003, linger on, systemd user units). Base:/home/gitea-workflow/apps/slpsoftware/{production,test}/withreleases/<timestamp>/,current(symlink to the release) andshared/(env, mode 600;modules/;wwwroot-web->/mnt/storage1/www/html/slpsoftware/{test|production}). - User units
slpsoftware-test.service/slpsoftware-production.service:WorkingDirectory=%h/apps/slpsoftware/test/current,ExecStart=/usr/bin/dotnet %h/.../current/SlpModularCms.Api.SlpSoftware.dll,EnvironmentFile=%h/.../shared/env,Restart=on-failure,RestartSec=5,KillSignal=SIGINT,TimeoutStopSec=20,WantedBy=default.target. - Ports in use: SlpSoftware test 5100, production 5101; SimpleDeckApp 5150/5151; 5000 (wedding-rsvp, local), 3000 Gitea, 3001 Umami, 3306 MariaDB (local), 80 nginx, 2224 sshd. Free for us: 5200 / 5201, with a ufw rule needed.
- Reverse proxy: the separate proxy Pi (
pi-entry, certbot, TLS) sendstest.slpsoftware.nlandslpsoftware.nldirectly to the app port on the application Pi (HTTP/1.0), bypassing nginx on that Pi. The app serves the SPA itself. Routing per hostname lives on the proxy Pi. - Deploy:
appleboy/drone-scpover SSH asgitea-workflowto port 2224 (password). Before and after a release~/scripts/backup-slpsoftware-db.shruns. The exact steps are in the CMS repo'sdeploy-scp.yaml.
Reuse and what is per instance
- Gitea runners: Pi runner (rootless Podman,
network: host, labels includearm64,raspberry-pi,linux-arm64) and a second runner on Bryan's PC (x64; a job with onlyglobal/linux/podmancan land there, so ARM64 builds must requirearm64orlinux-arm64). - Reusable: SSH user, scp target and base path. Per instance: app folder under
~/apps, unit, port, env file, database and database user, deploy paths, hostname and proxy config, repo secrets (in the CMS repo that holds the workflow; unknown whether they are organisation-wide). - A new deploy user or method needs an
sshd_configchange (root, Bryan).
MariaDB
- 10.11.19 on
127.0.0.1:3306and socket. Convention: PascalCase database named after the app (SlpSoftware/SlpSoftwareTest), user = app name@localhost. Decided by Bryan (2026-11-06): databaseAndreaSlopFotografieTest, userAndreaSlopFotografie@localhost(the CMS is part of the website; the company is AndreaSlopFotografie). Onlyroot@%exists; creation by Bryan viasudo mariadb -u root -p. - A database
andreaslop(WordPress, userandreaslop@localhost) already exists: do not confuse. - The weekly backup script reads
SHOW DATABASES(correction by the Pi-Main session, 2026-11-06): a new database is picked up automatically, no script change needed.
To create for the new instance (Bryan, with sudo where needed)
- As
gitea-workflow:~/apps/<name>/test/{releases,shared},shared/env(600), a user unit with the new port, enable it; website folder if needed. - MariaDB: database, user, grants.
- ufw (root): allow the chosen port (5200) only from the proxy Pi
192.168.1.102. - Proxy Pi: server block for the hostname to
192.168.1.103:<port>plus certbot. - Gitea: secrets and variables (deploy host, port 2224, user, password or key,
DEPLOY_PATH). - Hostname: decision for Bryan. Taking over
test.andreaslop.nl= switching the route on the proxy Pi to the new port (nginx on the app Pi stays as fallback). A temporary own name (for examplecms-test.andreaslop.nl) needs DNS and certbot on the proxy Pi.
Effects of taking over test.andreaslop.nl
- Today: proxy Pi -> Pi port 80 ->
/etc/nginx/conf.d/andreaslop-test.conf(generated byserverConfig.ts): canonical-URL map,error_page 404, gzip, security headers. The static site is deployed bygitea-workflowto/var/www/html/andreaslop-test(=/mnt/storage1/www/html/andreaslop-test) viaDEPLOY_PATH_TEST. - The new app must itself provide gzip, security headers, canonical 301 redirects and a real 404, and cope with HTTP/1.0 from the proxy. The proxy Pi adds no gzip, cache or headers.
- Verification against the old setup is possible on the Pi:
curl -H 'Host: test.andreaslop.nl' http://127.0.0.1/still reaches nginx. - The existing static deploy writes into the same web root: stop that workflow once the new host is live to avoid overwrites (or reuse that folder, see below).
Limits
- Pi 4, 4 cores, 7.6 GiB RAM, swap mostly off; about 5.4 GiB available with five .NET processes running (each 115 to 290 MB). A sixth instance of 250 to 300 MB fits. Builds run on the runner, which also uses this Pi's memory and CPU.
- Disk: SD card 57 GB (34% used), USB SSD
/mnt/storage1916 GB (1%). Releases are on the SD card (clean old ones); photos and uploads belong on/mnt/storage1. MariaDB data is on the SD card. - .NET 10 host runtime is shared by all apps (a runtime update affects all).
- The Pi-Main session offered to write a draft with exact commands if asked.
Notes for the design (this session)
- Possible simplification for U3: if the new instance's
shared/wwwroot-webpoints at/mnt/storage1/www/html/andreaslop-test(the folder the static deploy already writes), the existing web deploy keeps delivering the files and the CMS host serves them. Then U3 shrinks to verification plus retiring nginx's role. To evaluate in Infrastructure Design (both repos). - The new host must run behind HTTP/1.0 proxying: check
UseHttpsRedirection(the proxy terminates TLS) and forwarded headers; SlpSoftware already works this way, so copy its settings.