docs: Update deployment guide for direct file serving instead of proxy
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
# Deployment Guide for Mycelium Society Docs
|
# Deployment Guide for Mycelium Society Docs
|
||||||
|
|
||||||
This guide provides a deployment for serving the Mycelium Society documentation at `docs.mycelium.tf` by proxying to the existing content at `https://docs.ourworld.tf/mycelium_society/docs/`.
|
This guide provides a deployment for serving the Mycelium Society documentation at `docs.mycelium.tf`.
|
||||||
|
|
||||||
This allows users to access the docs via `docs.mycelium.tf` while the content is hosted elsewhere.
|
We build the docs website with hero docusaurus then we serve directly from files.
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
@@ -12,7 +12,7 @@ This allows users to access the docs via `docs.mycelium.tf` while the content is
|
|||||||
|
|
||||||
## Step 1: Configure Caddy
|
## Step 1: Configure Caddy
|
||||||
|
|
||||||
Update your Caddyfile to include the docs proxy:
|
Update your Caddyfile to include the docs serving:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Edit the Caddyfile (adjust path to your Caddyfile location)
|
# Edit the Caddyfile (adjust path to your Caddyfile location)
|
||||||
@@ -29,13 +29,10 @@ Create `mycelium_docs.caddy`:
|
|||||||
|
|
||||||
```
|
```
|
||||||
docs.mycelium.tf {
|
docs.mycelium.tf {
|
||||||
rewrite * /mycelium_society/docs{uri}
|
root * /root/hero/www/info/mycelium_society
|
||||||
reverse_proxy https://docs.ourworld.tf {
|
encode gzip
|
||||||
header_up Host docs.ourworld.tf
|
try_files {path} {path}/ /index.html
|
||||||
header_up X-Forwarded-Proto https
|
file_server
|
||||||
header_up X-Real-IP {remote}
|
|
||||||
header_up X-Forwarded-Host {host}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -45,6 +42,16 @@ docs.mycelium.tf {
|
|||||||
zinit restart caddy
|
zinit restart caddy
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Building and Publishing Docs
|
||||||
|
|
||||||
|
Users can build and publish the docs using:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
hero docusaurus -path ~/code/git.ourworld.tf/tfgrid/docs_tfgrid4/ebooks/mycelium_society -d
|
||||||
|
```
|
||||||
|
|
||||||
|
This builds the Docusaurus site and deploys it to `/root/hero/www/info/mycelium_society`.
|
||||||
|
|
||||||
## Monitoring
|
## Monitoring
|
||||||
|
|
||||||
- Check Caddy status: `zinit list`
|
- Check Caddy status: `zinit list`
|
||||||
@@ -54,5 +61,5 @@ zinit restart caddy
|
|||||||
## Notes
|
## Notes
|
||||||
|
|
||||||
- Ensure DNS for `docs.mycelium.tf` points to your server.
|
- Ensure DNS for `docs.mycelium.tf` points to your server.
|
||||||
- The content is served from `https://docs.ourworld.tf/mycelium_society/docs/`, but users see `docs.mycelium.tf`.
|
- The content is served directly from static files at `/root/hero/www/info/mycelium_society`.
|
||||||
- No additional build or cloning required; it's a reverse proxy setup.
|
- Build and deploy using the hero command above.
|
Reference in New Issue
Block a user