Skip to content

Embed frontend assets into Go binary for single-process deployment#30

Open
XUJiahua wants to merge 8 commits intoseifghazi:mainfrom
XUJiahua:main
Open

Embed frontend assets into Go binary for single-process deployment#30
XUJiahua wants to merge 8 commits intoseifghazi:mainfrom
XUJiahua:main

Conversation

@XUJiahua
Copy link

  1. Embed frontend assets into Go binary for single-process deployment
  2. Add proxy detection logging and Claude Code usage hint on startup
  3. Add GoReleaser config and GitHub Actions release workflow

XUJiahua and others added 8 commits February 27, 2026 16:28
Replace the two-process architecture (Go proxy + Remix SSR server) with
a single Go binary that serves embedded frontend assets. This simplifies
deployment, removes the Node.js runtime dependency in production, and
eliminates the need for a docker-entrypoint script.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Log detected HTTP/HTTPS proxy environment variables at startup to help
diagnose connectivity issues, and print a quick-start command for
connecting Claude Code to the proxy server.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Automates cross-platform binary builds (linux/darwin, amd64/arm64) on tag push using goreleaser-cross-action for CGO cross-compilation (needed by mattn/go-sqlite3). The workflow builds frontend assets and embeds them before compiling.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
goreleaser-cross-action does not exist as a GitHub Action. Use the
goreleaser-cross Docker image (ghcr.io/goreleaser/goreleaser-cross:v1.22.7)
directly via docker run, matching the official example pattern.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The v1.22.7 image ships GoReleaser v1 which doesn't support the
version 2 config format (formats field). Go 1.23+ images bundle
GoReleaser v2.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The go mod tidy hook runs from the project root where there is no
go.mod. The build config already sets dir: proxy to handle this.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The override approach caused linux/arm64 to use the wrong assembler.
Switch to separate build entries per goos/goarch with explicit CC and
CXX env vars, matching the official goreleaser-cross example pattern.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The Anthropic API accepts the system parameter as either a plain string
or an array of system message objects. Add custom UnmarshalJSON to handle
both formats, and log raw request body on JSON parse errors for debugging.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant