-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
serve command does not render workspace properly in an isolated/air-gapped environment #583
Comments
See https://github.com/avisi-cloud/structurizr-site-generatr/blob/main/README.md#customizing-the-generated-website, the |
Not everyone has a CDN configured in their network. Some use Artifactory as package manager/registry., so just changing the generatr.site.cdn property (to a local path) will not work, unless there is a bit of fiddling/scripting that: download tar files from the package repo, untar then copy them to the site location, as specified in generatr.site.cdn In our case, the npm is configured to use a local registry (that is downloading/caching the libraries from Internet). |
Unfortunately no plans from our side to add more hosting use cases, sorry. This project doesn't use |
The CDN is just a URL so you could just drop the assets in to your assets folder with the correct name to match a public can and then set the CDN config to be localhost:8080/npm... As mentioned these are just for runtime and not actually downloaded to a node_modules directory like a node app would do. Maybe a small contribution would be needed to make a 'serve only cdn' vs a 'generate only cdn' so you can specify two different CDNs depending on how the site is being viewed. |
I think this has been answered. feel free to reopen if there are still questions open or, even better, open a PR with improvements to the documentation. |
It seems that the docker image uses a few npm and other resources that are fetched from Internet (CDN, npm).
https://github.com/avisi-cloud/structurizr-site-generatr/blob/d5fe340484043722a92892720b5c2e470856d9bb/package.json
structurizr-site-generatr/src/main/kotlin/nl/avisi/structurizr/site/generatr/site/views/CDN.kt
Line 22 in d5fe340
Since Internet cannot be accessed, it will try to fetch those packages/resources from the CDN: https://cdn.jsdelivr.net/npm
While trying to serve the website in an air-gapped environment, this will caused for an incorrect loading of the workspace.
The dependencies should be packaged inside the docker image, so that it can be used in air-gapped environments
The text was updated successfully, but these errors were encountered: