mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-20 20:34:19 +00:00
Replace the embedded SPA (go:embed + build tags) with runtime download from GitHub Releases. The binary no longer bundles UI assets — they are downloaded on first `skillshare ui` launch and cached at ~/.cache/skillshare/ui/<version>/. - Delete embed.go / embed_dev.go; add spa_disk.go with placeholder handler - Simplify ensureUIAvailable(): cache check before dev-mode fallback - Pre-download UI assets in `skillshare upgrade` (best-effort) - Remove Node stages from production and CI Dockerfiles - Keep Node stage in sandbox for playground UI cache pre-population - Remove ui-embed-check CI job and -tags dev build flag - Update Makefile, mise.toml, GoReleaser, release workflow
95 lines
2.0 KiB
YAML
95 lines
2.0 KiB
YAML
x-sandbox-common: &sandbox-common
|
|
build:
|
|
context: .
|
|
dockerfile: docker/sandbox/Dockerfile
|
|
working_dir: /workspace
|
|
environment:
|
|
GOCACHE: /go/build-cache
|
|
volumes:
|
|
- .:/workspace
|
|
- go-mod-cache:/go/pkg/mod
|
|
- go-build-cache:/go/build-cache
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: "2"
|
|
memory: "2G"
|
|
|
|
services:
|
|
sandbox-offline:
|
|
<<: *sandbox-common
|
|
profiles:
|
|
- offline
|
|
command:
|
|
- ./scripts/test.sh
|
|
network_mode: none
|
|
environment:
|
|
HOME: /tmp
|
|
GOCACHE: /go/build-cache
|
|
|
|
sandbox-online:
|
|
<<: *sandbox-common
|
|
profiles:
|
|
- online
|
|
command:
|
|
- ./scripts/test.sh
|
|
environment:
|
|
HOME: /tmp
|
|
GOCACHE: /go/build-cache
|
|
GITHUB_TOKEN: ${GITHUB_TOKEN:-}
|
|
|
|
sandbox-playground:
|
|
<<: *sandbox-common
|
|
profiles:
|
|
- playground
|
|
read_only: true
|
|
cap_drop:
|
|
- ALL
|
|
command:
|
|
- sleep
|
|
- infinity
|
|
ports:
|
|
- "19420:19420"
|
|
environment:
|
|
HOME: /sandbox-home
|
|
GOCACHE: /go/build-cache
|
|
PATH: /sandbox-home/.local/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
|
GITHUB_TOKEN: ${SKILLSHARE_PLAYGROUND_GITHUB_TOKEN:-}
|
|
volumes:
|
|
- .:/workspace:ro
|
|
- go-mod-cache:/go/pkg/mod
|
|
- go-build-cache:/go/build-cache
|
|
- playground-home:/sandbox-home
|
|
tmpfs:
|
|
- /tmp:exec,mode=1777,size=256m
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "curl -sf http://localhost:19420/api/health || exit 1"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 15s
|
|
|
|
sandbox-dev:
|
|
<<: *sandbox-common
|
|
profiles:
|
|
- dev
|
|
command:
|
|
- bash
|
|
- -c
|
|
- >-
|
|
cd /workspace &&
|
|
go run ./cmd/skillshare init -g --no-copy --no-git --skill 2>/dev/null;
|
|
go run ./cmd/skillshare ui -g --no-open --host 0.0.0.0
|
|
ports:
|
|
- "19420:19420"
|
|
environment:
|
|
HOME: /tmp
|
|
GOCACHE: /go/build-cache
|
|
|
|
volumes:
|
|
go-mod-cache:
|
|
go-build-cache:
|
|
playground-home:
|