Migrate to subdomain, fix vulnerabilities, and update deploy for Hetzner - #62
Merged
Conversation
Move from the cwooper.me/schedule-optimizer subpath to the schedule-optimizer.cwooper.me subdomain, and patch known advisories. Subdomain migration: - Frontend serves from root: vite base '/', API at /api, drop the proxy rewrite; update canonical/og URLs. - Backend static handler no longer strips a /schedule-optimizer prefix. - Update CORS example and README live link to the subdomain. Vulnerabilities: - Bump golang.org/x/net (0.47->0.55), x/crypto, quic-go (0.57->0.59.1); go directive -> 1.25 (required by quic-go). govulncheck clean. - Bump vite and vitest; add pnpm overrides for transitive dev-tooling advisories (minimatch, picomatch, flatted, rollup, ajv, brace-expansion, postcss). pnpm audit clean. - Approve esbuild's build script in pnpm config so frozen installs exit 0. - Bump documented Go prerequisite to 1.25.
- Point PATH at the new server layout (~/.local/bin, ~/.local/share/pnpm/bin, ~/go/bin). - Build and test the Go server with CGO_ENABLED=1; mattn/go-sqlite3 needs cgo, and the new box has gcc. Without it the binary compiles to a stub that fails at runtime with "requires cgo to work."
There was a problem hiding this comment.
Pull request overview
This PR updates the app’s hosting/deploy setup to serve from a dedicated subdomain root path, while also addressing dependency security advisories across the Go backend and Vite/Vitest frontend toolchain, and updating the production deploy workflow for a new Hetzner host environment.
Changes:
- Migrate from
/schedule-optimizersubpath hosting to serving from/(frontend Vite base/proxy, backend static handler, and public metadata URLs). - Apply dependency upgrades/overrides to resolve known vulnerability advisories (Go modules + frontend dev tooling).
- Update the production deploy workflow (PATH changes; build/test with
CGO_ENABLED=1for sqlite3).
Reviewed changes
Copilot reviewed 12 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Updates public “Try it live” URL and Go version prerequisites. |
| CLAUDE.md | Updates server setup docs to require Go 1.25+. |
| backend/README.md | Updates backend prerequisite docs to Go 1.25+. |
| backend/.env.example | Updates example CORS origin for the new subdomain. |
| backend/go.mod | Bumps Go/tooling deps (x/*, quic-go) and adjusts module requirements. |
| backend/go.sum | Updates module checksums consistent with dependency bumps. |
| backend/internal/static/handler.go | Removes subpath-stripping behavior to serve static assets from root. |
| backend/internal/static/handler_test.go | Updates static handler tests to match root hosting paths. |
| frontend/vite.config.ts | Switches Vite base path to / and proxies /api to the backend. |
| frontend/index.html | Updates canonical and OG URLs to the new subdomain root. |
| frontend/package.json | Bumps vite/vitest and adds pnpm overrides / build-script allow-list config. |
| frontend/pnpm-workspace.yaml | Adds pnpm config intended to allow esbuild and enforce patched transitive versions. |
| frontend/pnpm-lock.yaml | Updates lockfile for new tool versions and override constraints. |
| .github/workflows/deploy.yml | Updates deploy PATH and runs Go build/test with CGO_ENABLED=1. |
Files not reviewed (1)
- frontend/pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -0,0 +1,26 @@ | |||
| # esbuild runs a postinstall script to fetch its platform binary. pnpm 10+ | |||
Comment on lines
35
to
39
| // Determine the logical file path (for gzip lookup) | ||
| filePath := strings.TrimPrefix(urlPath, "/") | ||
| filePath := strings.TrimPrefix(r.URL.Path, "/") | ||
| if filePath == "" { | ||
| filePath = "index.html" | ||
| } |
Cwooper
added a commit
that referenced
this pull request
Jun 13, 2026
…ner (#62) * Migrate to subdomain and fix backend/frontend vulnerabilities Move from the cwooper.me/schedule-optimizer subpath to the schedule-optimizer.cwooper.me subdomain, and patch known advisories. Subdomain migration: - Frontend serves from root: vite base '/', API at /api, drop the proxy rewrite; update canonical/og URLs. - Backend static handler no longer strips a /schedule-optimizer prefix. - Update CORS example and README live link to the subdomain. Vulnerabilities: - Bump golang.org/x/net (0.47->0.55), x/crypto, quic-go (0.57->0.59.1); go directive -> 1.25 (required by quic-go). govulncheck clean. - Bump vite and vitest; add pnpm overrides for transitive dev-tooling advisories (minimatch, picomatch, flatted, rollup, ajv, brace-expansion, postcss). pnpm audit clean. - Approve esbuild's build script in pnpm config so frozen installs exit 0. - Bump documented Go prerequisite to 1.25. * Update deploy workflow for new Hetzner server - Point PATH at the new server layout (~/.local/bin, ~/.local/share/pnpm/bin, ~/go/bin). - Build and test the Go server with CGO_ENABLED=1; mattn/go-sqlite3 needs cgo, and the new box has gcc. Without it the binary compiles to a stub that fails at runtime with "requires cgo to work."
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three related pieces of work for the infra rework:
1. Subdomain migration (
cwooper.me/schedule-optimizer→schedule-optimizer.cwooper.me)The app now serves from root instead of a subpath, simplifying nginx/DNS.
base: '/', API calls hit/api, dropped the proxy rewrite; updatedcanonical/og:url./schedule-optimizerprefix (serves from root).CORS_ALLOWED_ORIGINSexample and the README "Try it live" link.2. Vulnerability fixes (resolves the dependabot alerts on
main)golang.org/x/net0.47→0.55,golang.org/x/crypto,quic-go0.57→0.59.1.govulncheckis clean. The go directive moved to 1.25 (required by quic-go 0.59.1).pnpmoverrides for transitive dev-tooling advisories (minimatch, picomatch, flatted, rollup, ajv, brace-expansion, postcss).pnpm auditis clean; production audit was clean throughout.pnpm install --frozen-lockfileexits 0 (it was erroring underset -e).3. Deploy workflow for the new Hetzner box
~/.local/bin,~/.local/share/pnpm/bin,~/go/bin).buildandtestrun withCGO_ENABLED=1(mattn/go-sqlite3 needs cgo).allowBuilds(latest pnpm ✓)Verification
go build ./...+go test ./...pass;govulncheckclean.pnpm install --frozen-lockfileexits 0,vite build(root base path), 118/118 tests pass,pnpm auditclean.