Rename the dashboard program castle-app -> castle
The dashboard is now served at castle.<domain> (was castle-app.<domain>). Since the subdomain is the program name, this is just a program rename plus the one special-case constant. - Generator: _DASHBOARD = "castle" (the :9000 redirect target and off-mode root). - Program file renamed (runtime): programs/castle-app.yaml -> programs/castle.yaml (source unchanged: repo:app). - Dashboard UI: ProgramDetail shows a frontend's subdomain (via subdomainUrl), dropping the old castle-app-at-root special-case; comment refs updated. - Docs: registry.md/design.md/react-vite.md updated to the subdomain model and the `castle` name (react-vite.md also corrected — frontends serve at their subdomain root with VITE_BASE=/, and builds are manual via `castle program build`, not deploy).
This commit is contained in:
@@ -87,7 +87,7 @@ class TestAcmeMode:
|
||||
def test_port_9000_redirects_to_dashboard(self) -> None:
|
||||
cf = generate_caddyfile_from_registry(_acme({"api": _dep(9020, expose=True, name="api")}))
|
||||
assert ":9000 {" in cf
|
||||
assert "redir https://castle-app.example.com{uri}" in cf
|
||||
assert "redir https://castle.example.com{uri}" in cf
|
||||
|
||||
def test_no_path_routes(self) -> None:
|
||||
cf = generate_caddyfile_from_registry(_acme({"api": _dep(9020, expose=True, name="api")}))
|
||||
@@ -113,7 +113,7 @@ class TestAcmeMode:
|
||||
cfg = _config(
|
||||
services={},
|
||||
programs={
|
||||
"castle-app": ProgramSpec(
|
||||
"castle": ProgramSpec(
|
||||
behavior="frontend", source="/data/repos/castle/app",
|
||||
build=BuildSpec(outputs=["dist"]),
|
||||
)
|
||||
@@ -121,7 +121,7 @@ class TestAcmeMode:
|
||||
)
|
||||
monkeypatch.setattr(config_mod, "load_config", lambda *a, **k: cfg)
|
||||
cf = generate_caddyfile_from_registry(_acme({}))
|
||||
assert "@host_castle_app host castle-app.example.com" in cf
|
||||
assert "@host_castle host castle.example.com" in cf
|
||||
assert "root * /data/repos/castle/app/dist" in cf
|
||||
assert "try_files {path} /index.html" in cf
|
||||
assert "file_server" in cf
|
||||
|
||||
Reference in New Issue
Block a user