Files
usmt-dash/Dockerfile
T
Johan Sandoval 1c531bc2ab Generalize USMT Dash and add a containerized demo mode
Remove all environment-specific data and make the dashboard adoptable
anywhere, then add a demo that runs the real PowerShell services.

- Strip cached device data, internal knowledge-base articles and
  screenshots, server/site names and the old project notes; replace the
  knowledge base with generic sample articles and diagrams
- Move every environment value into Config/usmt-dash.psd1
- Route all infrastructure access in the worker and Get-Software.ps1
  through a provider (Providers/SCCM.ps1), with a config-driven asset
  inventory view instead of a hard-coded custom class
- Add Providers/Demo.ps1: a deterministic simulated fleet whose
  migrations progress in real time, and Demo/New-DemoData.ps1 to seed it
- Server: -Demo makes the API read-only; add get-config and get-logs;
  serve static files only from web/, Documentation/ and an allowlist of
  Data/ files with a path-traversal guard; gzip large responses
- Mirror both services' console output to Data/Logs via a Write-Host
  proxy, and add a terminal panel to the dashboard that streams it
- Demo sandbox (web/demo/demo.js): visitor changes to tags, articles and
  images are kept in the visitor's browser and echoed in the terminals;
  nothing a visitor does reaches the server
- Vendor marked, highlight.js and html2pdf.js instead of loading CDNs
- Dockerfile and compose file for hosting the demo (Coolify-ready)
2026-10-06 15:20:43 +00:00

35 lines
1.2 KiB
Docker

# USMT Dash - demo container
#
# Runs the real USMT-Server.ps1 and USMT-Worker.ps1 under PowerShell 7 with -Demo, so the
# worker sweeps a simulated fleet instead of SCCM/AD/SMB. The web API is read-only in demo
# mode; visitor changes are simulated in each visitor's browser.
#
# docker build -t usmt-dash .
# docker run -p 8080:8080 usmt-dash
FROM mcr.microsoft.com/powershell:lts-ubuntu-22.04
ENV USMT_MODE=Demo \
POWERSHELL_TELEMETRY_OPTOUT=1 \
POWERSHELL_UPDATECHECK=Off \
DOTNET_CLI_TELEMETRY_OPTOUT=1 \
TZ=UTC
WORKDIR /app
COPY . /app
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata \
&& rm -rf /var/lib/apt/lists/* \
&& useradd --system --home /app --shell /usr/sbin/nologin usmt \
&& mkdir -p /app/Data \
&& chown -R usmt:usmt /app/Data \
&& chmod +x /app/docker/start.sh
USER usmt
EXPOSE 8080
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
CMD pwsh -NoProfile -Command "try { if ((Invoke-WebRequest -UseBasicParsing http://127.0.0.1:8080/get-config -TimeoutSec 5).StatusCode -eq 200) { exit 0 } } catch {}; exit 1"
ENTRYPOINT ["/app/docker/start.sh"]