Deploy Marketplace to Hetzner k3s cluster at projectmycelium.com/marketplace/demo #7

Closed
opened 2026-02-07 20:41:34 +00:00 by mik-tf · 0 comments
Owner

Summary

Deploy the Mycelium Marketplace as a pod on the Hetzner k3s cluster, accessible at:
https://projectmycelium.com/marketplace/demo

The Docker image is already built and published. Kubernetes manifests are ready in the repo.

Docker Image

forge.ourworld.tf/mycelium_code/projectmycelium_marketplace:latest

What to Deploy

All manifests are in deploy/k8s/. Apply in order:

kubectl apply -f namespace.yaml    # creates projectmycelium namespace
kubectl apply -f secrets.yaml      # postgres + app credentials (fill in CHANGE_ME values)
kubectl apply -f postgres.yaml     # PostgreSQL StatefulSet + 10Gi PVC
kubectl apply -f marketplace.yaml  # Marketplace Deployment + Service
kubectl apply -f ingress.yaml      # Ingress for projectmycelium.com/marketplace/demo

Prerequisites

  • Create Forgejo registry pull secret:
    kubectl create namespace projectmycelium
    kubectl create secret docker-registry forgejo-registry \
      --namespace projectmycelium \
      --docker-server=forge.ourworld.tf \
      --docker-username=YOUR_FORGEJO_USERNAME \
      --docker-password=YOUR_FORGEJO_TOKEN
    
  • Generate secrets and update deploy/k8s/secrets.yaml:
    openssl rand -base64 32   # for POSTGRES_PASSWORD
    openssl rand -base64 64   # for SECRET_KEY
    
  • Choose ingress controller: ingress.yaml has Nginx (default) and Traefik (commented) options
  • TLS cert for projectmycelium.com (cert-manager or existing)

Important Notes

  • Do NOT strip the path prefix. The ingress must forward /marketplace/demo/* as-is to the backend. The app expects APP_BASE_PATH=/marketplace/demo.
  • Health check endpoint: GET /marketplace/demo/api/health on port 8000
  • Ingress path: /marketplace/demo with Prefix match type

Verification

# Pods running
kubectl -n projectmycelium get pods

# Health check
curl -s https://projectmycelium.com/marketplace/demo/api/health
# Expected: {"service":"mycelium-marketplace","status":"healthy",...}

# Main page
curl -s -o /dev/null -w "%{http_code}" https://projectmycelium.com/marketplace/demo/
# Expected: 200

Reference

Full deployment guide: docs/PRODUCTION_DEPLOYMENT.md

Dev/Test Instance (already live)

https://projectmycelium.org/marketplace/demo/ - running on TFGrid VM, same image, confirmed working.

## Summary Deploy the Mycelium Marketplace as a pod on the Hetzner k3s cluster, accessible at: **https://projectmycelium.com/marketplace/demo** The Docker image is already built and published. Kubernetes manifests are ready in the repo. ## Docker Image ``` forge.ourworld.tf/mycelium_code/projectmycelium_marketplace:latest ``` ## What to Deploy All manifests are in `deploy/k8s/`. Apply in order: ```bash kubectl apply -f namespace.yaml # creates projectmycelium namespace kubectl apply -f secrets.yaml # postgres + app credentials (fill in CHANGE_ME values) kubectl apply -f postgres.yaml # PostgreSQL StatefulSet + 10Gi PVC kubectl apply -f marketplace.yaml # Marketplace Deployment + Service kubectl apply -f ingress.yaml # Ingress for projectmycelium.com/marketplace/demo ``` ## Prerequisites - [ ] Create Forgejo registry pull secret: ```bash kubectl create namespace projectmycelium kubectl create secret docker-registry forgejo-registry \ --namespace projectmycelium \ --docker-server=forge.ourworld.tf \ --docker-username=YOUR_FORGEJO_USERNAME \ --docker-password=YOUR_FORGEJO_TOKEN ``` - [ ] Generate secrets and update `deploy/k8s/secrets.yaml`: ```bash openssl rand -base64 32 # for POSTGRES_PASSWORD openssl rand -base64 64 # for SECRET_KEY ``` - [ ] Choose ingress controller: `ingress.yaml` has Nginx (default) and Traefik (commented) options - [ ] TLS cert for `projectmycelium.com` (cert-manager or existing) ## Important Notes - **Do NOT strip the path prefix.** The ingress must forward `/marketplace/demo/*` as-is to the backend. The app expects `APP_BASE_PATH=/marketplace/demo`. - **Health check endpoint:** `GET /marketplace/demo/api/health` on port 8000 - **Ingress path:** `/marketplace/demo` with Prefix match type ## Verification ```bash # Pods running kubectl -n projectmycelium get pods # Health check curl -s https://projectmycelium.com/marketplace/demo/api/health # Expected: {"service":"mycelium-marketplace","status":"healthy",...} # Main page curl -s -o /dev/null -w "%{http_code}" https://projectmycelium.com/marketplace/demo/ # Expected: 200 ``` ## Reference Full deployment guide: [`docs/PRODUCTION_DEPLOYMENT.md`](https://forge.ourworld.tf/mycelium_code/projectmycelium_marketplace/src/branch/main/docs/PRODUCTION_DEPLOYMENT.md) ## Dev/Test Instance (already live) https://projectmycelium.org/marketplace/demo/ - running on TFGrid VM, same image, confirmed working.
Commenting is not possible because the repository is archived.
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
coopcloud_code/projectmycelium_marketplace#7
No description provided.