Sign inSign up

runonflux/marketplace-admin

By runonflux

•Updated 4 months ago

Image
0

1.5K

runonflux/marketplace-admin repository overview

⁠FluxCloud Marketplace Admin

Web application for managing the FluxCloud Marketplace. Built with React, TypeScript, Redux Toolkit, and Material UI.

⁠Tech Stack

  • Vite - Build tool
  • React 19 + TypeScript
  • Redux Toolkit - State management
  • Material UI (MUI) - Component library
  • React Router v7 - Client-side routing
  • @dnd-kit - Drag-and-drop (Featured/Games screens)

⁠Development

# Install dependencies
npm install

# Development server
npm run dev

# Production build
npm run build

# Type checking
npx tsc --noEmit

# Lint
npm run lint
⁠Environment

Set VITE_ENV at build time to point the app at the right fluxmarketplace-api instance. Both marketplaceUrl and wordpressBridgeUrl resolve to the same hostname now — they're served by the same backend.

ValueBackend (marketplaceUrl + wordpressBridgeUrl)
prodhttps://api.marketplace.runonflux.io
devhttps://api-dev.marketplace.runonflux.io
debughttp://localhost:8082 (run fluxmarketplace-api locally), HTTP login enabled
VITE_ENV=debug npm run dev

⁠Docker

Two compose files, one per environment. Both can run side-by-side on the same VM.

InstanceCompose fileContainer nameHost portDocker Hub imageBuilt from branchPublic hostname
Proddocker-compose.prod.ymlcloud-admin8090runonflux/marketplace-admin:latestmasteradmin.marketplace.runonflux.io
Devdocker-compose.dev.ymlcloud-admin-dev8091runonflux/marketplace-admin-dev:latestdevelopment_buildadmin-dev.marketplace.runonflux.io

Images are built by Docker Hub Automated Builds — pushes to master rebuild runonflux/marketplace-admin:latest via Dockerfile-prod, pushes to development_build rebuild runonflux/marketplace-admin-dev:latest via Dockerfile-dev. Watchtower (defined in docker-compose.watchtower.yml) polls Docker Hub every 5 minutes and replaces the running container whenever a new digest appears, so no manual redeploy is needed after a merge.

Bring them up (only needed the first time, or after editing a compose file):

# Production
docker compose -f docker-compose.prod.yml up -d

# Development
docker compose -f docker-compose.dev.yml up -d

# Watchtower (auto-updater — only needs to run once per host)
docker compose -f docker-compose.watchtower.yml up -d

Force an immediate pull + restart (otherwise just wait for Watchtower):

docker compose -f docker-compose.prod.yml pull && docker compose -f docker-compose.prod.yml up -d
docker compose -f docker-compose.dev.yml  pull && docker compose -f docker-compose.dev.yml  up -d

Tail logs / restart:

docker compose -f docker-compose.prod.yml logs -f
docker compose -f docker-compose.prod.yml restart

Each image bakes VITE_ENV in at build time on Docker Hub (prod → calls api.marketplace.runonflux.io, dev → calls api-dev.marketplace.runonflux.io), so the running container has nothing to configure at startup. The internal Node 20 build stage produces static files which the nginx stage serves on port 80 — the host port mapping (8090 / 8091) is what HAProxy points at.

The public hostname (admin.marketplace.runonflux.io / admin-dev.marketplace.runonflux.io) is configured in HAProxy on the way in — not in the nginx config inside the image.

⁠HAProxy fragment
acl host_admin_prod  hdr(host) admin.marketplace.runonflux.io
acl host_admin_dev   hdr(host) admin-dev.marketplace.runonflux.io

use_backend admin_prod if host_admin_prod
use_backend admin_dev  if host_admin_dev

backend admin_prod
    mode http
    server admin 127.0.0.1:8090 check

backend admin_dev
    mode http
    server admin_dev 127.0.0.1:8091 check

Use 127.0.0.1 if cloud_admin runs on the same VM as HAProxy. Otherwise use that VM's private IP and add a ufw rule for ports 8090/8091.

⁠Features

  • App List - Browse, search, filter, edit, and save marketplace apps
  • Featured Apps - Manage featured apps with drag-and-drop reordering
  • Games / Trending - Manage games list with drag-and-drop reordering
  • WordPress Plans - Edit WordPress hosting plans (CPU, RAM, SSD, instances, pricing)
  • ZelCore Authentication - Login and action signing via ZelCore wallet

Tag summary

Content type

Image

Digest

sha256:9ddeab42e…

Size

5.7 MB

Last updated

4 months ago

docker pull runonflux/marketplace-admin