diff --git a/Docs/Content.md b/Docs/Content.md index 7511229..bb21d83 100644 --- a/Docs/Content.md +++ b/Docs/Content.md @@ -3,7 +3,9 @@ The authoritative application-help source remains `PlotDirector/PlotLine/Help/Articles`. Context keys, category slugs, article slugs, search, related articles and the existing Markdown renderer are retained. The -application's contextual drawer continues to read its own source. Website content +application's contextual drawer retains the same service/renderer and can read its +own separately installed approved publication. Without HelpContent:Path it keeps +the original file-source behavior used by source tools and existing tests. Website content never comes from a running application, SQL query or an HTTP call to the application. `Help/published` is the checked-in, generated bootstrap publication, not an editable @@ -61,7 +63,14 @@ For the installed Atlas website, the administrator uses `--store /opt/plotdirector-website-dev/shared/help`; Production uses `/srv/plotdirector-website/shared/help` and **must use `--channel Production`**. Both channels are usable in Development, but explicitly choose the approved channel. -The store is administrator-owned. The helper validates checksums, channel, paths and +For application help, consume the **same artifact and approved digest** into +`/opt/plotdirector-dev/shared/help` (Development) or `/srv/plotdirector/shared/help` +(Production), using the application's `HelpContent__Path` to select its own `current`. +These are separate immutable copies of one publication, not separately edited sources. +Neither deployment operates the other's store. Publish/rollback each pointer explicitly; +both services reload their own approved content without a restart. + +The stores are administrator-owned. The helper validates checksums, channel, paths and public article identities, installs an immutable digest-named directory and atomically switches `current`. No service restart follows. `HelpContent__Path` selects `current`. Retain old directories. Rollback is an atomic `current` symlink replacement to a diff --git a/PlotDirector.Website/Controllers/HelpImageController.cs b/PlotDirector.Website/Controllers/HelpImageController.cs index 98f12da..a9efd76 100644 --- a/PlotDirector.Website/Controllers/HelpImageController.cs +++ b/PlotDirector.Website/Controllers/HelpImageController.cs @@ -9,7 +9,7 @@ public sealed class HelpImageController(IWebHostEnvironment environment,IConfigu var root=Path.GetFullPath(Path.Combine(configuration["HelpContent:Path"]??Path.Combine(environment.ContentRootPath,"Help/published"),"assets")); var path=Path.GetFullPath(Path.Combine(root,file)); if(!path.StartsWith(root+Path.DirectorySeparatorChar,StringComparison.Ordinal)||!System.IO.File.Exists(path))return NotFound(); - var type=Path.GetExtension(path).ToLowerInvariant() switch {".png"=>"image/png",".jpg" or ".jpeg"=>"image/jpeg",".webp"=>"image/webp",".avif"=>"image/avif",_=>null}; + var type=Path.GetExtension(path).ToLowerInvariant() switch {".png"=>"image/png",".jpg" or ".jpeg"=>"image/jpeg",".webp"=>"image/webp",".avif"=>"image/avif",".gif"=>"image/gif",".svg"=>"image/svg+xml",_=>null}; return type is null?NotFound():PhysicalFile(path,type); } } diff --git a/Tools/Deployment/production/application-origin.env.example b/Tools/Deployment/production/application-origin.env.example new file mode 100644 index 0000000..e324a66 --- /dev/null +++ b/Tools/Deployment/production/application-origin.env.example @@ -0,0 +1,5 @@ +# Merge these non-secret values into the EXISTING application configuration at +# approved cutover. Do not replace its environment file, secrets, workers or keys. +Site__WebsiteBaseUrl=https://plotdirector.com +AllowedHosts=app.plotdirector.com;plotdirector.com;127.0.0.1 +HelpContent__Path=/srv/plotdirector/shared/help/current