chore: rename service from tf-marketplace to projectmycelium in Makefile

This commit is contained in:
mik-tf
2025-09-01 22:15:57 -04:00
parent 7fe1bf77c3
commit afea7039cf

View File

@@ -44,7 +44,7 @@ update-dev: ## Update development environment (git pull + restart)
@echo "📥 Pulling latest development changes..." @echo "📥 Pulling latest development changes..."
@ssh root@info.ourworld.tf 'cd /root/code/git.ourworld.tf/tfgrid_research/dev/threefold-marketplace && git checkout development && git pull' @ssh root@info.ourworld.tf 'cd /root/code/git.ourworld.tf/tfgrid_research/dev/threefold-marketplace && git checkout development && git pull'
@echo "🔄 Restarting development service..." @echo "🔄 Restarting development service..."
@ssh root@info.ourworld.tf 'zinit restart tf-marketplace-dev' @ssh root@info.ourworld.tf 'zinit restart projectmycelium-dev'
@echo "✅ Development update complete!" @echo "✅ Development update complete!"
update-prod: ## Update production environment (git pull + restart) update-prod: ## Update production environment (git pull + restart)
@@ -52,18 +52,18 @@ update-prod: ## Update production environment (git pull + restart)
@echo "📥 Pulling latest main changes..." @echo "📥 Pulling latest main changes..."
@ssh root@info.ourworld.tf 'cd /root/code/git.ourworld.tf/tfgrid_research/prod/threefold-marketplace && git checkout main && git pull' @ssh root@info.ourworld.tf 'cd /root/code/git.ourworld.tf/tfgrid_research/prod/threefold-marketplace && git checkout main && git pull'
@echo "🔄 Restarting production service..." @echo "🔄 Restarting production service..."
@ssh root@info.ourworld.tf 'zinit restart tf-marketplace-prod' @ssh root@info.ourworld.tf 'zinit restart projectmycelium-prod'
@echo "✅ Production update complete!" @echo "✅ Production update complete!"
rm-dev: ## Remove development repo directory on server (DANGEROUS) rm-dev: ## Remove development repo directory on server (DANGEROUS)
@echo "🧨 Removing development repo on server..." @echo "🧨 Removing development repo on server..."
@ssh root@info.ourworld.tf 'zinit stop tf-marketplace-dev || true' @ssh root@info.ourworld.tf 'zinit stop projectmycelium-dev || true'
@ssh root@info.ourworld.tf 'rm -rf /root/code/git.ourworld.tf/tfgrid_research/dev/threefold-marketplace' @ssh root@info.ourworld.tf 'rm -rf /root/code/git.ourworld.tf/tfgrid_research/dev/threefold-marketplace'
@ssh root@info.ourworld.tf 'test ! -d /root/code/git.ourworld.tf/tfgrid_research/dev/threefold-marketplace && echo "✅ Dev repo removed" || (echo "❌ Failed to remove dev repo" && exit 1)' @ssh root@info.ourworld.tf 'test ! -d /root/code/git.ourworld.tf/tfgrid_research/dev/threefold-marketplace && echo "✅ Dev repo removed" || (echo "❌ Failed to remove dev repo" && exit 1)'
rm-prod: ## Remove production repo directory on server (DANGEROUS) rm-prod: ## Remove production repo directory on server (DANGEROUS)
@echo "🧨 Removing production repo on server..." @echo "🧨 Removing production repo on server..."
@ssh root@info.ourworld.tf 'zinit stop tf-marketplace-prod || true' @ssh root@info.ourworld.tf 'zinit stop projectmycelium-prod || true'
@ssh root@info.ourworld.tf 'rm -rf /root/code/git.ourworld.tf/tfgrid_research/prod/threefold-marketplace' @ssh root@info.ourworld.tf 'rm -rf /root/code/git.ourworld.tf/tfgrid_research/prod/threefold-marketplace'
@ssh root@info.ourworld.tf 'test ! -d /root/code/git.ourworld.tf/tfgrid_research/prod/threefold-marketplace && echo "✅ Prod repo removed" || (echo "❌ Failed to remove prod repo" && exit 1)' @ssh root@info.ourworld.tf 'test ! -d /root/code/git.ourworld.tf/tfgrid_research/prod/threefold-marketplace && echo "✅ Prod repo removed" || (echo "❌ Failed to remove prod repo" && exit 1)'
@@ -72,14 +72,14 @@ clone-dev: ## Clone development repo on server and start service
@ssh root@info.ourworld.tf 'mkdir -p /root/code/git.ourworld.tf/tfgrid_research/dev && cd /root/code/git.ourworld.tf/tfgrid_research/dev && if [ -d threefold-marketplace ]; then echo "Repo already exists. Skipping clone."; else git clone https://git.ourworld.tf/tfgrid_research/threefold-marketplace.git; fi' @ssh root@info.ourworld.tf 'mkdir -p /root/code/git.ourworld.tf/tfgrid_research/dev && cd /root/code/git.ourworld.tf/tfgrid_research/dev && if [ -d threefold-marketplace ]; then echo "Repo already exists. Skipping clone."; else git clone https://git.ourworld.tf/tfgrid_research/threefold-marketplace.git; fi'
@ssh root@info.ourworld.tf 'cd /root/code/git.ourworld.tf/tfgrid_research/dev/threefold-marketplace && git checkout development || echo "Branch development not found, using default."' @ssh root@info.ourworld.tf 'cd /root/code/git.ourworld.tf/tfgrid_research/dev/threefold-marketplace && git checkout development || echo "Branch development not found, using default."'
@echo "🚀 Starting development service..." @echo "🚀 Starting development service..."
@ssh root@info.ourworld.tf 'zinit start tf-marketplace-dev' @ssh root@info.ourworld.tf 'zinit start projectmycelium-dev'
clone-prod: ## Clone production repo on server and start service clone-prod: ## Clone production repo on server and start service
@echo "📥 Cloning production repository on server..." @echo "📥 Cloning production repository on server..."
@ssh root@info.ourworld.tf 'mkdir -p /root/code/git.ourworld.tf/tfgrid_research/prod && cd /root/code/git.ourworld.tf/tfgrid_research/prod && if [ -d threefold-marketplace ]; then echo "Repo already exists. Skipping clone."; else git clone https://git.ourworld.tf/tfgrid_research/threefold-marketplace.git; fi' @ssh root@info.ourworld.tf 'mkdir -p /root/code/git.ourworld.tf/tfgrid_research/prod && cd /root/code/git.ourworld.tf/tfgrid_research/prod && if [ -d threefold-marketplace ]; then echo "Repo already exists. Skipping clone."; else git clone https://git.ourworld.tf/tfgrid_research/threefold-marketplace.git; fi'
@ssh root@info.ourworld.tf 'cd /root/code/git.ourworld.tf/tfgrid_research/prod/threefold-marketplace && git checkout main || echo "Branch main not found, using default."' @ssh root@info.ourworld.tf 'cd /root/code/git.ourworld.tf/tfgrid_research/prod/threefold-marketplace && git checkout main || echo "Branch main not found, using default."'
@echo "🚀 Starting production service..." @echo "🚀 Starting production service..."
@ssh root@info.ourworld.tf 'zinit start tf-marketplace-prod' @ssh root@info.ourworld.tf 'zinit start projectmycelium-prod'
setup-dev: ## Setup development environment (first-time) setup-dev: ## Setup development environment (first-time)
@echo "<22> Setting up development service on server..." @echo "<22> Setting up development service on server..."
@@ -94,19 +94,19 @@ setup-dev: ## Setup development environment (first-time)
exit 1; \ exit 1; \
fi fi
@echo "📋 Copying development deployment script..." @echo "📋 Copying development deployment script..."
@scp scripts/tf-marketplace-dev.sh root@info.ourworld.tf:/etc/zinit/cmds/tf-marketplace-dev.sh @scp scripts/projectmycelium-dev.sh root@info.ourworld.tf:/etc/zinit/cmds/projectmycelium-dev.sh
@ssh root@info.ourworld.tf 'chmod +x /etc/zinit/cmds/tf-marketplace-dev.sh' @ssh root@info.ourworld.tf 'chmod +x /etc/zinit/cmds/projectmycelium-dev.sh'
@echo "📋 Copying development service configuration..." @echo "📋 Copying development service configuration..."
@scp config/zinit/tf-marketplace-dev.yaml root@info.ourworld.tf:/etc/zinit/tf-marketplace-dev.yaml @scp config/zinit/projectmycelium-dev.yaml root@info.ourworld.tf:/etc/zinit/projectmycelium-dev.yaml
@echo "📋 Copying deployment credentials..." @echo "📋 Copying deployment credentials..."
@scp .env.deploy root@info.ourworld.tf:/tmp/tf-marketplace-deploy.env @scp .env.deploy root@info.ourworld.tf:/tmp/projectmycelium-deploy.env
@echo "🔍 Setting up development monitoring..." @echo "🔍 Setting up development monitoring..."
@ssh root@info.ourworld.tf 'zinit monitor tf-marketplace-dev' @ssh root@info.ourworld.tf 'zinit monitor projectmycelium-dev'
@echo "🚀 Starting development service..." @echo "🚀 Starting development service..."
@ssh root@info.ourworld.tf 'zinit start tf-marketplace-dev' @ssh root@info.ourworld.tf 'zinit start projectmycelium-dev'
@echo "✅ Development setup complete!" @echo "✅ Development setup complete!"
@echo "📊 Development service status:" @echo "📊 Development service status:"
@ssh root@info.ourworld.tf 'zinit list | grep tf-marketplace-dev' @ssh root@info.ourworld.tf 'zinit list | grep projectmycelium-dev'
setup-prod: ## Setup production environment (first-time) setup-prod: ## Setup production environment (first-time)
@echo "🔧 Setting up production service on server..." @echo "🔧 Setting up production service on server..."
@@ -121,21 +121,21 @@ setup-prod: ## Setup production environment (first-time)
exit 1; \ exit 1; \
fi fi
@echo "📋 Copying production deployment script..." @echo "📋 Copying production deployment script..."
@scp scripts/tf-marketplace-prod.sh root@info.ourworld.tf:/etc/zinit/cmds/tf-marketplace-prod.sh @scp scripts/projectmycelium-prod.sh root@info.ourworld.tf:/etc/zinit/cmds/projectmycelium-prod.sh
@ssh root@info.ourworld.tf 'chmod +x /etc/zinit/cmds/tf-marketplace-prod.sh' @ssh root@info.ourworld.tf 'chmod +x /etc/zinit/cmds/projectmycelium-prod.sh'
@echo "📋 Copying production service configuration..." @echo "📋 Copying production service configuration..."
@scp config/zinit/tf-marketplace-prod.yaml root@info.ourworld.tf:/etc/zinit/tf-marketplace-prod.yaml @scp config/zinit/projectmycelium-prod.yaml root@info.ourworld.tf:/etc/zinit/projectmycelium-prod.yaml
@echo "📋 Copying deployment credentials..." @echo "📋 Copying deployment credentials..."
@scp .env.deploy root@info.ourworld.tf:/tmp/tf-marketplace-deploy.env @scp .env.deploy root@info.ourworld.tf:/tmp/projectmycelium-deploy.env
@echo "🔍 Setting up production monitoring..." @echo "🔍 Setting up production monitoring..."
@ssh root@info.ourworld.tf 'zinit monitor tf-marketplace-prod' @ssh root@info.ourworld.tf 'zinit monitor projectmycelium-prod'
@echo "🚀 Starting production service..." @echo "🚀 Starting production service..."
@ssh root@info.ourworld.tf 'zinit start tf-marketplace-prod' @ssh root@info.ourworld.tf 'zinit start projectmycelium-prod'
@echo "🔄 Restarting Caddy to load configurations..." @echo "🔄 Restarting Caddy to load configurations..."
@ssh root@info.ourworld.tf 'zinit restart caddy' @ssh root@info.ourworld.tf 'zinit restart caddy'
@echo "✅ Production setup complete!" @echo "✅ Production setup complete!"
@echo "📊 Production service status:" @echo "📊 Production service status:"
@ssh root@info.ourworld.tf 'zinit list | grep tf-marketplace-prod' @ssh root@info.ourworld.tf 'zinit list | grep projectmycelium-prod'
setup: ## Setup both dev and prod environments (complete setup) setup: ## Setup both dev and prod environments (complete setup)
@echo "🔧 Setting up both dev and prod services on server (complete setup)..." @echo "🔧 Setting up both dev and prod services on server (complete setup)..."
@@ -145,22 +145,22 @@ setup: ## Setup both dev and prod environments (complete setup)
@echo "" @echo ""
@echo "✅ Complete setup finished!" @echo "✅ Complete setup finished!"
@echo "📊 All service status:" @echo "📊 All service status:"
@ssh root@info.ourworld.tf 'zinit list | grep tf-marketplace' @ssh root@info.ourworld.tf 'zinit list | grep projectmycelium'
status: ## Check service status on server status: ## Check service status on server
@echo "📊 Checking deployment status..." @echo "📊 Checking deployment status..."
@ssh root@info.ourworld.tf 'zinit list | grep tf-marketplace' @ssh root@info.ourworld.tf 'zinit list | grep projectmycelium'
logs-dev: ## View service logs from server logs-dev: ## View service logs from server
@echo "📋 Deployment logs:" @echo "📋 Deployment logs:"
@echo "=== Development Logs ===" @echo "=== Development Logs ==="
@ssh root@info.ourworld.tf 'zinit log tf-marketplace-dev' @ssh root@info.ourworld.tf 'zinit log projectmycelium-dev'
@echo "" @echo ""
logs-prod: ## View service logs from server logs-prod: ## View service logs from server
@echo "📋 Deployment logs:" @echo "📋 Deployment logs:"
@echo "=== Production Logs ===" @echo "=== Production Logs ==="
@ssh root@info.ourworld.tf 'zinit log tf-marketplace-prod' @ssh root@info.ourworld.tf 'zinit log projectmycelium-prod'
@echo "" @echo ""
help: ## Show this help message help: ## Show this help message