Skip to content

Demo Environment: Multi-Arch Support & Image Rename#1829

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

Demo Environment: Multi-Arch Support & Image Rename#1829
benjamin-747 merged 4 commits into
gitmono-dev:mainfrom
WiedersehenM:feat/mega-orion-demo-compose

Conversation

@WiedersehenM

Copy link
Copy Markdown
Contributor

Pull Request – Demo Environment: Multi-Arch Support & Image Rename

Related issue(#1792 )

What’s new

  1. Multi-arch workflow (demo-multiarch-build.yml)
    Stand-alone GitHub Action that builds and pushes amd64 + arm64 manifest images (mono-engine, mega-ui, orion-server, orion-client) to Amazon ECR Public.
    Triggered only on docker/demo/** changes or manual dispatch → no impact to production pipelines.

  2. Image rename mega-devorion-client

    • Rationale: reflect the container’s actual responsibility (Orion build worker).
    • Updated variables, tags and comments in:
      • docker/demo/docker-compose.demo.yml
      • docker/dev-image/docker-compose.yml (including container name)
      • .env.example
      • Existing deploy workflow renamed & adjusted (orion-client-image-deploy.yml).
  3. Documentation refresh

    • docs/demo/docker-compose-guide-for-mega-and-orion-demo-setup.md
      • Added Apple-Silicon quick note describing arm64 pull & manual workflow trigger.
    • Minor wording fixes and tag updates.

Why

  • Allow macOS M1/M2 contributors to run the full demo stack without Rosetta/QEMU emulation.
  • Remove legacy “mega-dev” naming confusion.

🛠 Implementation details

Area Change
CI New multi-arch workflow; existing prod workflows untouched (paths-ignore ensures isolation).
Compose Env var ORION_CLIENT_IMAGE, default tag orion-client-0.1.0-pre-release.
Dev compose Same rename; container orion-client-shell.
Docs Service images list + Apple-Silicon section.

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>
* New demo-multiarch-build.yml
* Update compose files to orion-client naming
* Update demo docs

Signed-off-by: Hongze Gao <15101764808@163.com>
Add .github/workflows/demo-multiarch-build.yml which builds and pushes
amd64 + arm64 manifest images for demo services (mono-engine, mega-ui,
orion-server, orion-client). Workflow is triggered only on changes
under docker/demo or via manual dispatch, keeping production pipelines
unaffected.

Signed-off-by: Hongze Gao <15101764808@163.com>
Comment on lines +16 to +82
if: ${{ github.repository == 'web3infra-foundation/mega' }}
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
matrix:
include:
# mono backend
- name: mono-engine
dockerfile: docker/mono-engine-dockerfile
image_tag: mono-0.1.0-pre-release
# mega UI
- name: mega-ui
dockerfile: docker/mono-ui-dockerfile
image_tag: mega-ui-demo-0.1.0-pre-release
# orion server
- name: orion-server
dockerfile: orion-server/Dockerfile
image_tag: orion-server-0.1.0-pre-release
# orion client image (build worker)
- name: orion-client-image
dockerfile: docker/dev-image/Dockerfile
image_tag: orion-client-0.1.0-pre-release
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up QEMU (multi-arch emulation)
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
install: true

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: Login to Amazon ECR Public
id: login-ecr-public
uses: aws-actions/amazon-ecr-login@v2
with:
registry-type: public

- name: Build & push ${{ matrix.name }} (amd64+arm64)
env:
REGISTRY: ${{ steps.login-ecr-public.outputs.registry }}
REGISTRY_ALIAS: m8q5m4u3
REPOSITORY: mega
IMAGE_TAG: ${{ matrix.image_tag }}
DOCKERFILE_PATH: ${{ matrix.dockerfile }}
run: |
IMAGE_BASE="$REGISTRY/$REGISTRY_ALIAS/$REPOSITORY"

docker buildx build \
--platform linux/amd64,linux/arm64 \
--builder default \
--file "$DOCKERFILE_PATH" \
--tag "$IMAGE_BASE:$IMAGE_TAG" \
--push \
--build-arg BUILDKIT_INLINE_CACHE=1 \
--cache-from type=gha,scope=mega-demo \
--cache-to type=gha,scope=mega-demo,mode=max \
.

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
@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 e41d215 Jan 22, 2026
12 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