koopa-admin-log/configs/paivana
Hernâni Marques 17f25d41c9
docs(paivana): disable racey upstream unit; smoke expects 302/402
Compose unit starts both containers; standalone upstream podman-start
raced at boot (exit 125). Live stack already healthy on hacktivism.
2026-07-17 20:06:16 +02:00
..
conf paivana: refresh compose, Containerfile, and conf template. 2026-07-16 23:55:31 +02:00
secrets configs/paivana: add secret path docs and token example 2026-07-13 11:14:22 +02:00
upstream configs/paivana: charge GOA:4200 for example site 2026-07-13 11:39:55 +02:00
compose.yml paivana: pin Taler hosts to pasta IPv4 172.17.0.1 2026-07-17 18:50:16 +02:00
container-koopa-paivana.service configs/paivana: enable compose on reboot 2026-07-13 11:51:33 +02:00
Containerfile paivana: refresh compose, Containerfile, and conf template. 2026-07-16 23:55:31 +02:00
entrypoint.sh configs/paivana: add Containerfile and compose on :9025 2026-07-13 11:03:47 +02:00
README.md docs(paivana): disable racey upstream unit; smoke expects 302/402 2026-07-17 20:06:16 +02:00
taler-systems.gpg configs/paivana: add Containerfile and compose on :9025 2026-07-13 11:03:47 +02:00

paivana — paivana.hacktivism.ch

GNU Taler paivana-httpd reverse-proxy paywall (DD 95 / DD 76 style), GOA payments.

Item Value
Live /home/hernani/koopa-paivana/
Containers koopa-paivana, koopa-paivana-upstream
Image localhost/koopa-paivana:latest (built from Containerfile); process uid 1000 paivana-httpd
Upstream nginxinc/nginx-unprivileged on :8080 (not root nginx:80)
Host port 9025 → Caddy paivana.hacktivism.ch
Currency GOA
Merchant https://taler.hacktivism.ch/instances/goa-shop/
Template paivana (template_type: paivana, amount GOA:4200, website_regex: .*)
Access -g site-wide: pay once → example upstream free to browse
Upstream example site in upstream/ (compose service)

Layout

Path Role
Containerfile Multi-stage: build paivana-httpd from git.taler.net/paivana + Taler libs
compose.yml koopa-paivana + nginx upstream
conf/paivana.conf.template Config; secrets substituted at start
entrypoint.sh Inject secrets → run paivana-httpd -g -f
secrets/ not in git — live only
upstream/ Protected demo content
container-koopa-paivana.service systemd --user oneshot compose up
taler-systems.gpg Deb signing key (build context)

Secrets (live)

File Role
~/koopa-paivana/secrets/merchant-access-token secret-token:… for goa-shop
~/koopa-paivana/secrets/paivana-secret cookie MAC secret (stable across restarts)

Mirror notes: koopa-admin-secretskoopa/home-hernani/koopa-paivana/secrets/ (paths only / examples).

Ops

# as hernani on koopa
cd ~/koopa-paivana
podman compose build
podman compose up -d
podman logs -f koopa-paivana
curl -si http://127.0.0.1:9025/ | head   # 302 → /.well-known/paivana/templates/paivana#…

Autostart (only the compose unit — starts both koopa-paivana and koopa-paivana-upstream):

mkdir -p ~/.config/systemd/user
cp ~/koopa-paivana/container-koopa-paivana.service ~/.config/systemd/user/
# optional: After= merchant (configs/systemd/user/container-koopa-paivana.service.d/)
systemctl --user daemon-reload
systemctl --user enable --now container-koopa-paivana.service

Do not enable a separate container-koopa-paivana-upstream.service that only runs podman start koopa-paivana-upstream. At boot that unit races compose (container not created yet → exit 125 → start-limit-hit). Compose already starts the upstream. If such a unit exists:
systemctl --user disable --now container-koopa-paivana-upstream.service.

Healthy smoke:

Check Expect
curl -si http://127.0.0.1:9025/ 302/.well-known/paivana/templates/paivana#…
template URL / public https://paivana.hacktivism.ch/ 402 paywall HTML + paivana: taler://pay-template/…
monitoring ./scripts/taler-monitoring/taler-monitoring.sh -d hacktivism.ch urlswww.paivana OK

Network notes

Rootless pasta cannot hairpin public DNS for the merchant. Compose sets:

extra_hosts:
  - "taler.hacktivism.ch:host-gateway"

so paivana-httpd can load templates from the merchant API.

Caddy

Vhost → 127.0.0.1:9025 (see configs/caddy/Caddyfile).
Flags -g (site-wide payment) and -f (X-Forwarded-For).

Merchant template

curl -X POST 'https://taler.hacktivism.ch/instances/goa-shop/private/templates' \
  -H "Authorization: Bearer secret-token:…" \
  -H 'Content-Type: application/json' \
  -d '{
    "template_id": "paivana",
    "template_description": "Paivana paywall (GOA)",
    "template_contract": {
      "template_type": "paivana",
      "summary": "Access to paivana.hacktivism.ch",
      "website_regex": ".*",
      "choices": [{ "amount": "GOA:4200", "description": "Unlock example site (then free to browse)" }]
    }
  }'

Docs