feat: v2 rewrite — hexagonal arch, ActivityPub federation, NATS, deployment-ready #1

Merged
GKaszewski merged 334 commits from v2 into master 2026-05-16 09:42:43 +00:00
Showing only changes of commit 61c82d77ba - Show all commits

View File

@@ -1,9 +1,28 @@
#!/usr/bin/env bash
set -euo pipefail
IMAGE="registry.gabrielkaszewski.dev/thoughts:latest"
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://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 "$IMAGE" --push .
-t "$BACKEND_IMAGE" --push .
echo "pushed $IMAGE"
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"