Open
Conversation
…s service Replace the proxy_pass to localhost:2998 in the bare-domain nginx server block with a root + try_files directive serving static files from the Docusaurus build directory. - nginx-conf.ejs: static file serving from /opt/opensource-server/mie-opensource-landing/build - Makefile: remove systemd service install/enable/start from install-docs - Delete mie-opensource-landing/systemd/opensource-docs.service - Dockerfile: install nginx, serve on port 80, add standalone site config - New images/docs/docs-site.conf for the test container Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
8051f6f to
3dd75f5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale
The existing
npm run serveservice takes an additional port (2998) and introduces an extra hop to just serve static files. This PR allows NGINX to serve the files directly (which it excels at) avoiding port-in-use conflicts and simplifying operations.Migration
cd mie-opensource-landing && npm run buildsystemctl disable --now opensource-docs.servicerm /etc/systemd/system/opensource-docs.servicesystemctl daemon-reloadUpdating documentation after this patch
Instead of running
systemctl restart opensource-docs.servicejust runcd mie-opensource-landing && npm run buildCopilot Summary
This pull request updates how the documentation site is served by switching from a Node.js-based server (managed by systemd) to serving the static build with nginx. The changes simplify deployment, remove unnecessary service management, and update Docker and nginx configurations accordingly.
Deployment and Service Management:
opensource-docs.servicesystemd service and all related installation and startup steps from theMakefile, so the docs site is no longer run as a Node.js process managed by systemd. [1] [2]Docker and nginx Configuration:
images/docs/Dockerfileto install nginx, expose port 80 instead of 2998, and copy a new nginx configuration for serving the static documentation site.images/docs/docs-site.conf, a new nginx config to serve the built documentation statically from/opt/opensource-server/mie-opensource-landing/buildwith security headers and proper fallback for missing files.create-a-container/views/nginx-conf.ejsto serve the documentation statically instead of proxying to a Node.js server.