Skip to content

Feat/mega orfeat(demo-compose): introduce demo environment for Mega UI and sync docsion demo compose#1827

Merged
benjamin-747 merged 4 commits into
gitmono-dev:mainfrom
WiedersehenM:feat/mega-orion-demo-compose
Jan 22, 2026
Merged

Feat/mega orfeat(demo-compose): introduce demo environment for Mega UI and sync docsion demo compose#1827
benjamin-747 merged 4 commits into
gitmono-dev:mainfrom
WiedersehenM:feat/mega-orion-demo-compose

Conversation

@WiedersehenM

Copy link
Copy Markdown
Contributor

Description

Related issue: #1792

1. Changes

  • CI / GitHub Actions

    • web-deploy: add demo to the build matrix → publishes mega-ui-demo-0.1.0-pre-release.
  • Docker Compose

    • docker/demo/docker-compose.demo.yml
      • default MEGA_UI_IMAGE switched to the demo tag.
      • OAuth / cookie / CORS domains set to gitmono.local.
      • RustFS ports clarified: 9000 (S3 API) / 9001 (console).
    • added moon/apps/web/.env.demo for APP_ENV=demo builds.
  • Environment sample

    • .env.example
      • all URLs switched to gitmono.local with correct ports (3000 / 8000 / 8004 / 8080).
      • MEGA_OAUTH__ALLOWED_CORS_ORIGINS expressed as a JSON array.
  • Docs

    • docs/demo/docker-compose-guide-for-mega-and-orion-demo-setup.md
      • hosts-file mapping section added.
      • RustFS port table fixed.
      • default image tags updated to demo.

2. How to test

# 1) hosts mapping
echo "127.0.0.1 app.gitmono.local git.gitmono.local api.gitmono.local \
auth.gitmono.local orion.gitmono.local" | sudo tee -a /etc/hosts

# 2) start services
cp docker/demo/.env.example docker/demo/.env
docker compose -f docker/demo/docker-compose.demo.yml up -d

# 3) smoke checks
docker compose -f docker/demo/docker-compose.demo.yml ps
curl -f http://localhost:8000/api/v1/status       # Mega API
curl -f http://localhost:8004/v2/health           # Orion Server

---

## Checklist  

- [x] fork `main` is rebased on `upstream/main`  
- [x] feature branch rebased on latest `main`  
- [x] commits signed off **and** GPG-signed (`-s -S`)  
- [x] GitHub Actions green  
- [x] local end-to-end test successful  

Add one-click demo stack:

- docker-compose.demo.yml (+ .env.example, init-db.sh)

- docs guide

- minor Orion server tweaks

Signed-off-by: Hongze Gao <15101764808@163.com>
Review feedback addressed:
- Remove unused init-db.sh mount and delete placeholder script
- Orion /v2/health now hides database error details
- Add docker/demo/.env to .gitignore to prevent secret leakage
- Add .dockerignore to reduce build context size
- docker-compose.demo.yml:
  • pass CAMPSITE_RUN_MIGRATIONS to campsite_api
  • add sample resource limits to postgres
- Docs: fix FAQ anchor, replace full-width punctuation, add hardware requirements and MySQL low-privilege note.

Signed-off-by: Hongze Gao <15101764808@163.com>
- CI: web-deploy workflow builds & publishes mega-ui-demo image
- Compose:
  • default MEGA_UI_IMAGE points to demo tag
  • gitmono.local domains for OAuth / CORS / Mega host
  • docs and health-check notes unchanged
- Env:
  • .env.example aligned with gitmono.local + JSON CORS array
  • add moon/apps/web/.env.demo for APP_ENV=demo build
- Docs:
  • update docker-compose guide (ports 9000/9001, hosts mapping section)

Signed-off-by: Hongze Gao <15101764808@163.com>
@genedna genedna requested a review from benjamin-747 January 21, 2026 14:20
@genedna

genedna commented Jan 21, 2026

Copy link
Copy Markdown
Collaborator

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8af436b24b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread moon/apps/web/.env.demo Outdated
Comment on lines +1 to +3
NEXT_PUBLIC_API_URL=https://api.gitmono.local:8080
NEXT_PUBLIC_MONO_API_URL=https://git.gitmono.local:8000
NEXT_PUBLIC_WEB_URL=https://app.gitmono.local:3000

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use HTTP for local demo endpoints

The new .env.demo bakes https://*.gitmono.local URLs into the demo UI image, but the local demo compose only exposes plain HTTP services on these ports (see docker/demo/.env.example using http://...:3000/8000/8080/8004). Because the UI Dockerfile copies .env.${APP_ENV} into .env.production at build time, the demo image will always attempt HTTPS and fail with TLS/mixed-content errors when run locally. Consider switching these demo URLs to http:// (or adding TLS termination in the demo compose) so the demo stack can actually connect.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已更正

…itmono-dev#1792)

- Switch all NEXT_PUBLIC_* demo URLs from https:// to http://
  to match local docker-compose (no TLS termination).
- Correct typo in NEXT_PUBLIC_INTERNAL_API_URL
  (https://api.gitmono.local:8080http://api.gitmono.local:8080).

Signed-off-by: Hongze Gao <15101764808@163.com>
@benjamin-747 benjamin-747 added this pull request to the merge queue Jan 22, 2026
Merged via the queue into gitmono-dev:main with commit 25bada9 Jan 22, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants