From eac89c2e3965e58655b6816c9f8abcffb4e103e5 Mon Sep 17 00:00:00 2001 From: Toni Bergholm Date: Fri, 20 Nov 2026 08:45:33 +0200 Subject: [PATCH] Bind demo and test fixture ports to localhost and drop personal details from cert script The demo Postgres (credentials agentic:agentic), the test Postgres and fake-gcs published their ports on all interfaces. Publish them on 127.0.0.1 only; every consumer already connects via localhost. website/deploy/finish-certs.sh hard-coded the contact email and the name of a personal server. The email now comes from the required CERT_EMAIL variable, which fails fast when unset, and the hostname is removed from the header comment. --- examples/langgraph-rollback/docker-compose.yml | 2 +- tests/fixtures/fake-gcs.yml | 2 +- tests/fixtures/pg.yml | 2 +- website/deploy/finish-certs.sh | 7 +++++-- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/examples/langgraph-rollback/docker-compose.yml b/examples/langgraph-rollback/docker-compose.yml index 0a602cb3..14a6e1ff 100644 --- a/examples/langgraph-rollback/docker-compose.yml +++ b/examples/langgraph-rollback/docker-compose.yml @@ -18,7 +18,7 @@ services: POSTGRES_PASSWORD: agentic POSTGRES_DB: agentic ports: - - "54322:5432" + - "127.0.0.1:54322:5432" command: - "postgres" - "-c" diff --git a/tests/fixtures/fake-gcs.yml b/tests/fixtures/fake-gcs.yml index 799bd05e..4360fb53 100644 --- a/tests/fixtures/fake-gcs.yml +++ b/tests/fixtures/fake-gcs.yml @@ -28,4 +28,4 @@ services: - "-backend" - "memory" ports: - - "54323:4443" + - "127.0.0.1:54323:4443" diff --git a/tests/fixtures/pg.yml b/tests/fixtures/pg.yml index 7ef41b40..8df4b42f 100644 --- a/tests/fixtures/pg.yml +++ b/tests/fixtures/pg.yml @@ -20,7 +20,7 @@ services: POSTGRES_PASSWORD: agentic POSTGRES_DB: agentic ports: - - "54321:5432" + - "127.0.0.1:54321:5432" command: - "postgres" - "-c" diff --git a/website/deploy/finish-certs.sh b/website/deploy/finish-certs.sh index 2c38d638..61b2a369 100644 --- a/website/deploy/finish-certs.sh +++ b/website/deploy/finish-certs.sh @@ -2,17 +2,20 @@ # Idempotent: issue any missing certs for git-agentic.{com,dev,org} and # swap nginx to the TLS-enabled config once they are in place. # -# Lives at /usr/local/bin/finish-git-agentic-certs.sh on bergholm.net. +# Installed on the web host as /usr/local/bin/finish-git-agentic-certs.sh. +# Requires CERT_EMAIL (Let's Encrypt contact address) in the environment. # Safe to run repeatedly — it skips work that's already done. set -uo pipefail +: "${CERT_EMAIL:?set CERT_EMAIL (certbot contact address)}" + LOG=/var/log/git-agentic-finalize.log exec >>"$LOG" 2>&1 echo echo "=== $(date -u +%FT%TZ) run ===" -EMAIL=toni@git-agentic.com +EMAIL=$CERT_EMAIL WEBROOT=/var/www/certbot issue() {