Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

RFC: Offline docs#8110

Closed
BrunoQuaresma started this conversation inRFCs
Jun 20, 2023· 2 comments· 17 replies
Discussion options

We have a few users that need to run Coder from air-gapped networks, and to make that work fully, we need to support offline docs.

Constraints

  • We don't want to increase the bundle size significantly. Right now, embedding the docs directly would add ~11MB to the binary which is not desired.

Proposed solution

  • Pack the coder docs into a separate package/artifact during release so the operator could host the docs markdown files locally or anywhere else.
  • Add an option to the Coder CLI to set the path or URL to the custom docs pathcoder server --offline-docs <docs-path> that could be a URL or a path to load the markdown files. It could also be an env variable likeOFFLINE_DOCS=<docs-path> coder server.
  • Add theoffline_docs config into the deployment endpoint so the FE can knows it is using or not offline docs. It is also used from the FE to fetch the markdown files content.
  • Add into the FE the related docs pages.
  • Change the docs links in the app to use or not the offline docs if the options is enabled.

Possible issues

  • The docs files need to be hosted in a web server so the FE can use the images and fetch the content properly. One possible solution would be to move the content fetching into the BE but we still need to have access to the images so it would not remove the web server dependency entirely.
  • The docs should be hosted under the same domain to avoid CORS issues.
You must be logged in to vote

Replies: 2 comments 17 replies

Comment options

A quick & simple solution would be to produce a docs container image, or just a tar of the webroot to drop into NGINX, Apache, or whatever. We don't need to modify the dashboard. The operator can just host the docs wherever makes sense in their network.

If we get significant customer interest in tighter docs integration we could work on the above proposal, but I think we should stick to something simple at first.

You must be logged in to vote
17 replies
@ammario
Comment options

Yeah, coder.com

@BrunoQuaresma
Comment options

BrunoQuaresmaJun 21, 2023
Collaborator Author

I don't think it is important to have offline docs and the website looking the same because they have different purposes. This looks an early abstraction thing when they look similar but have different context

@ammario
Comment options

I agree they don't have to look the same. My desire for code reuse is based on a worry that we may break the Offline Docs features without noticing it because of the sparse usage.

@BrunoQuaresma
Comment options

BrunoQuaresmaJun 22, 2023
Collaborator Author

Since it would be generated statically we would get the errors during the build tho

@BrunoQuaresma
Comment options

BrunoQuaresmaJun 22, 2023
Collaborator Author

At least the "broken" ones. Things like wrong links would not be catch but we can do some testing to avoid this

Comment options

BrunoQuaresma
Jun 23, 2023
Collaborator Author

So the final decision is:

  • Copy the docs engine we have from offline docs in v1
  • Build it during the release
  • Add docs about this feature
  • Add tests to catch any missed links in the docs
You must be logged in to vote
0 replies
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
RFCs
Labels
None yet
5 participants
@BrunoQuaresma@mafredri@spikecurtis@ammario@deansheather

[8]ページ先頭

©2009-2025 Movatter.jp