feat: v2 rewrite — hexagonal arch, ActivityPub federation, NATS, deployment-ready (#1)
Some checks failed
lint / lint (push) Has been cancelled
test / unit (push) Has been cancelled
test / integration (push) Has been cancelled

This commit was merged in pull request #1.
This commit is contained in:
2026-05-16 09:42:40 +00:00
parent 071809bc3f
commit 9aee4ceb6d
224 changed files with 35418 additions and 1469 deletions

28
deploy.sh Executable file
View File

@@ -0,0 +1,28 @@
#!/usr/bin/env bash
set -euo pipefail
REGISTRY="registry.gabrielkaszewski.dev"
BACKEND_IMAGE="$REGISTRY/thoughts:latest"
FRONTEND_IMAGE="$REGISTRY/thoughts-frontend:latest"
# Public API URL seen by the browser.
# Override with: NEXT_PUBLIC_API_URL=https://api.example.com ./deploy.sh
API_URL="${NEXT_PUBLIC_API_URL:-https://api.thoughts.gabrielkaszewski.dev}"
# Internal API URL used by Next.js SSR (can be a Docker-internal address in prod).
# Override with: NEXT_PUBLIC_SERVER_SIDE_API_URL=http://api:8000 ./deploy.sh
SSR_API_URL="${NEXT_PUBLIC_SERVER_SIDE_API_URL:-$API_URL}"
echo "==> building backend image: $BACKEND_IMAGE"
docker buildx build --platform linux/amd64 \
-t "$BACKEND_IMAGE" --push .
echo "==> building frontend image: $FRONTEND_IMAGE"
docker buildx build --platform linux/amd64 \
--build-arg "NEXT_PUBLIC_API_URL=$API_URL" \
--build-arg "NEXT_PUBLIC_SERVER_SIDE_API_URL=$SSR_API_URL" \
-t "$FRONTEND_IMAGE" --push \
./thoughts-frontend
echo "==> pushed $BACKEND_IMAGE"
echo "==> pushed $FRONTEND_IMAGE"