Web application for managing the FluxCloud Marketplace. Built with React, TypeScript, Redux Toolkit, and Material UI.
# Install dependencies
npm install
# Development server
npm run dev
# Production build
npm run build
# Type checking
npx tsc --noEmit
# Lint
npm run lint
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.
| Value | Backend (marketplaceUrl + wordpressBridgeUrl) |
|---|---|
prod | https://api.marketplace.runonflux.io |
dev | https://api-dev.marketplace.runonflux.io |
debug | http://localhost:8082 (run fluxmarketplace-api locally), HTTP login enabled |
VITE_ENV=debug npm run dev
Two compose files, one per environment. Both can run side-by-side on the same VM.
| Instance | Compose file | Container name | Host port | Docker Hub image | Built from branch | Public hostname |
|---|---|---|---|---|---|---|
| Prod | docker-compose.prod.yml | cloud-admin | 8090 | runonflux/marketplace-admin:latest | master | admin.marketplace.runonflux.io |
| Dev | docker-compose.dev.yml | cloud-admin-dev | 8091 | runonflux/marketplace-admin-dev:latest | development_build | admin-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.
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.
Content type
Image
Digest
sha256:9ddeab42e…
Size
5.7 MB
Last updated
4 months ago
docker pull runonflux/marketplace-admin