Files
piik/docs/operations/website.md
T
AAA 8effc8e8f4 fix(website): restore download provider labels and clarify Server packages
## Problem and outcome / 问题与结果

Restore explicit GitHub and Gitee labels on every platform download card while keeping each provider's native latest-download URL. Identify the Linux Server archive by its actual release filename in both READMEs and self-hosting guides, and record the remaining maintenance reports in TODO.

## Verification / 验证

- Website build, documentation checks and repository hygiene pass.
- Both languages fit at 360px; all six links retain their platform-specific latest routes.
- An independent reader ran the documented source and Windows App sharing paths; the Server archive naming correction follows that walkthrough.
- The release planner reports `publish: false` for this commit.

## Impact / 影响

Website and documentation only; no App/Server release. The Chrome block on Gitee downloads remains unresolved and tracked in TODO; the label correction does not clear that provider verdict.
2026-09-14 01:32:45 +08:00

5.7 KiB

Public website

The website source is site/. It explains Piik; it does not run rooms, signaling or media. The public introduction guide owns its content and design boundary.

Public Destinations

Entry Destination
Website piik.tv
P2P-only demo on the separate US server demo.piik.tv
App downloads and release notes GitHub Releases
Download mirror for domestic access Gitee Releases
Documentation index Repository documentation

These public destinations are live. GitHub Pages serves piik.tv behind Cloudflare; both the GitHub origin and Cloudflare edge use HTTPS. Website DNS is proxied with strict origin TLS verification and origin cache headers respected. Demo DNS remains unproxied so its UDP listeners stay reachable.

GitHub Pages can serve the complete website: it hosts static HTML, CSS and JavaScript. The demo also needs the Go service for room authority, WebSocket signaling and UDP STUN, so it runs on the separate US server rather than Pages.

Public Demo Configuration

The chosen demo allows entry without a site password and provides P2P sharing without SFU fallback. Use the self-hosting runbook with:

PIIK_ENV=production
LISTEN_HOST=127.0.0.1
PORT=8787
PUBLIC_BASE_URL=https://demo.piik.tv
ALLOWED_ORIGINS=https://demo.piik.tv
SITE_ACCESS_PASSWORD=
ROOM_DATABASE_PATH=/var/lib/piik/rooms.sqlite
MAX_VIEWERS_PER_ROOM=20
STUN_URLS=stun:demo.piik.tv:3478
NAT_PREDICTION_ENABLED=true
SFU_UDP_PORT=

Point demo.piik.tv directly at the US server so UDP reaches its STUN listeners; allow UDP 3478/3479/3480 and terminate HTTPS/WSS at Caddy. The demo uses the standard systemd service, with its release under /opt/piik/current and configuration at /etc/piik/piik.env. The service unit provides the SQLite state directory. Room ownership, invitations and private-room admission still apply. The configuration reference owns each setting and its bounds.

For updates, verify the release descriptor and manifest before placing a new release under /opt/piik/releases/. Stop Piik, back up its SQLite state, switch current to the verified release, and restart. Check local/public health, WebSocket room access and STUN. Keep the previous release and state backup until acceptance; restore both with Piik stopped if rollback is needed. The nginx-specific maintainer wrapper does not manage this Caddy installation.

Preview

With the repository's development dependencies installed:

npm run build:website
npm run preview:website

Open http://127.0.0.1:18890. Rebuild after editing source. The build bundles the film's real product components into an isolated demonstration frame; publishing build/site/ needs no Node runtime or backend. Vite preview supplies HTTP byte ranges for seeking the soundtrack. Keep asset links relative so both a custom domain and GitHub's /Piik/ project path work.

The Windows x64, macOS Apple silicon and Linux x64 cards use fixed filenames and each provider's native latest-attachment route:

Both links follow provider publication without a website rebuild or a release API request from the build or visitor. Platform buttons say “Download from GitHub” / “GitHub 下载”; the secondary link says “Download from Gitee” / “Gitee 国内镜像下载”. Keep versions and archive formats out of these labels. Versioning owns package verification and completion of mirror publication. GitHub remains the primary source; the Gitee download can temporarily lag while a mirror publication completes. Verify the latest redirects and package checksums after releases.

Publish

  1. Verify the public copy and destinations above, publish the release artifacts and open the source repository as part of the approved public launch.
  2. In repository Settings > Pages, choose GitHub Actions as the source. Use the dedicated Pages workflow, not publication of the repository root or all of docs/, which includes developer research and operational reference.
  3. Set the approved piik.tv custom domain in Pages settings and configure its DNS using GitHub's current domain instructions. Actions publishing does not need a CNAME file in the source tree.
  4. Accepted main pushes run CI first; its completion triggers Website, which checks out current main. Manual Website dispatch from main republishes the site when needed. Download links resolve through each provider, so publishing a package or retrying its mirror needs no link refresh. Only build/site/ is uploaded; website work does not package App/Server. Verify HTTPS, both languages, relative assets and per-platform download links.

Branch/PR pushes do not deploy. The workflow does not change DNS; the private production site and the US P2P-only demo remain separate deployments.

For rollback, dispatch the previously accepted site revision from a reviewed revert on main; runtime App/Server binaries and databases are unaffected.