docs: update deployment docs with new project name and port
This commit is contained in:
		@@ -21,11 +21,11 @@ We'll clone the repository to a structured directory path:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
```bash
 | 
					```bash
 | 
				
			||||||
# Create directory structure
 | 
					# Create directory structure
 | 
				
			||||||
mkdir -p /root/code/git.ourworld.tf/tfgrid_research/
 | 
					mkdir -p /root/code/git.ourworld.tf/tfgrid/prod
 | 
				
			||||||
cd /root/code/git.ourworld.tf/tfgrid_research/
 | 
					cd /root/code/git.ourworld.tf/tfgrid/prod
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Clone the repository
 | 
					# Clone the repository
 | 
				
			||||||
git clone https://git.ourworld.tf/tfgrid_research/projectmycelium
 | 
					git clone https://git.ourworld.tf/tfgrid/projectmycelium
 | 
				
			||||||
cd projectmycelium
 | 
					cd projectmycelium
 | 
				
			||||||
git checkout main
 | 
					git checkout main
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
@@ -38,34 +38,34 @@ Create a zinit service to run and manage the application:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
```bash 
 | 
					```bash 
 | 
				
			||||||
mkdir -p /etc/zinit/cmds
 | 
					mkdir -p /etc/zinit/cmds
 | 
				
			||||||
nano /etc/zinit/cmds/tf-marketplace.sh
 | 
					nano /etc/zinit/cmds/projectmycelium.sh
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Add the following content:
 | 
					Add the following content:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```bash
 | 
					```bash
 | 
				
			||||||
#!/bin/bash
 | 
					#!/bin/bash
 | 
				
			||||||
cd /root/code/git.ourworld.tf/tfgrid_research/projectmycelium
 | 
					cd /root/code/git.ourworld.tf/tfgrid/prod/projectmycelium
 | 
				
			||||||
git checkout main
 | 
					git checkout main
 | 
				
			||||||
exec /root/.cargo/bin/cargo run --release --bin projectmycelium -- --port 9999
 | 
					exec /root/.cargo/bin/cargo run --release --bin projectmycelium -- --port 9989
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Make the script executable:
 | 
					Make the script executable:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```bash
 | 
					```bash
 | 
				
			||||||
chmod +x /etc/zinit/cmds/tf-marketplace.sh
 | 
					chmod +x /etc/zinit/cmds/projectmycelium-prod.sh
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
2. Create the zinit service definition:
 | 
					2. Create the zinit service definition:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```bash
 | 
					```bash
 | 
				
			||||||
nano /etc/zinit/tf-marketplace.yaml
 | 
					nano /etc/zinit/projectmycelium-prod.yaml
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Add the following content:
 | 
					Add the following content:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```yaml
 | 
					```yaml
 | 
				
			||||||
exec: "/bin/bash -c /etc/zinit/cmds/tf-marketplace.sh"
 | 
					exec: "/bin/bash -c /etc/zinit/cmds/projectmycelium-prod.sh"
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -81,14 +81,14 @@ nano /root/code/github/despiegk/env_web/ourworld/ovh1_web_current/caddy/Caddyfil
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
- Add the Caddy file in Caddyfile
 | 
					- Add the Caddy file in Caddyfile
 | 
				
			||||||
    ```
 | 
					    ```
 | 
				
			||||||
    import threefold_marketplace.caddy
 | 
					    import projectmycelium.caddy
 | 
				
			||||||
    ```
 | 
					    ```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- Create `threefold_marketplace.caddy` then enter the following. Adjust your domain as needed.
 | 
					- Create `projectmycelium-prod.caddy` then enter the following. Adjust your domain as needed.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
threefold.pro {
 | 
					projectmycelium.org {
 | 
				
			||||||
    reverse_proxy localhost:9999 {
 | 
					    reverse_proxy localhost:9989 {
 | 
				
			||||||
        header_up Host {host}
 | 
					        header_up Host {host}
 | 
				
			||||||
        header_up X-Real-IP {remote}
 | 
					        header_up X-Real-IP {remote}
 | 
				
			||||||
        header_up X-Forwarded-Proto {scheme}
 | 
					        header_up X-Forwarded-Proto {scheme}
 | 
				
			||||||
@@ -100,14 +100,14 @@ threefold.pro {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
- Monitor the zinit service
 | 
					- Monitor the zinit service
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
zinit monitor tf-marketplace-prod
 | 
					zinit monitor projectmycelium-prod
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- Start the service
 | 
					- Start the service
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```bash
 | 
					```bash
 | 
				
			||||||
# Start the marketplace service
 | 
					# Start the marketplace service
 | 
				
			||||||
zinit start tf-marketplace-prod
 | 
					zinit start projectmycelium-prod
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Restart Caddy to load new configuration
 | 
					# Restart Caddy to load new configuration
 | 
				
			||||||
zinit restart caddy
 | 
					zinit restart caddy
 | 
				
			||||||
@@ -154,9 +154,9 @@ make setup
 | 
				
			|||||||
The deployment system uses industry-standard environment separation:
 | 
					The deployment system uses industry-standard environment separation:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
/root/code/git.ourworld.tf/tfgrid_research/
 | 
					/root/code/git.ourworld.tf/tfgrid/
 | 
				
			||||||
├── dev/projectmycelium/     # Development branch (port 9998)
 | 
					├── dev/projectmycelium/     # Development branch (port 9998)
 | 
				
			||||||
└── prod/projectmycelium/    # Production branch (port 9999)
 | 
					└── prod/projectmycelium/    # Production branch (port 9989)
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
**Benefits:**
 | 
					**Benefits:**
 | 
				
			||||||
@@ -171,13 +171,13 @@ The deployment system uses industry-standard environment separation:
 | 
				
			|||||||
- Sets up development environment only
 | 
					- Sets up development environment only
 | 
				
			||||||
- Clones to `dev/projectmycelium/`
 | 
					- Clones to `dev/projectmycelium/`
 | 
				
			||||||
- Uses development branch
 | 
					- Uses development branch
 | 
				
			||||||
- Runs on port 9998 (dev.threefold.pro)
 | 
					- Runs on port 9998 (dev.projectmycelium.org)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
**setup-prod:**
 | 
					**setup-prod:**
 | 
				
			||||||
- Sets up production environment only
 | 
					- Sets up production environment only
 | 
				
			||||||
- Clones to `prod/projectmycelium/`
 | 
					- Clones to `prod/projectmycelium/`
 | 
				
			||||||
- Uses main branch
 | 
					- Uses main branch
 | 
				
			||||||
- Runs on port 9999 (threefold.pro)
 | 
					- Runs on port 9989 (projectmycelium.org)
 | 
				
			||||||
- Restarts Caddy for production
 | 
					- Restarts Caddy for production
 | 
				
			||||||
 | 
					
 | 
				
			||||||
**setup (both):**
 | 
					**setup (both):**
 | 
				
			||||||
@@ -217,15 +217,15 @@ make help
 | 
				
			|||||||
```bash
 | 
					```bash
 | 
				
			||||||
# Development
 | 
					# Development
 | 
				
			||||||
ssh root@info.ourworld.tf
 | 
					ssh root@info.ourworld.tf
 | 
				
			||||||
cd /root/code/git.ourworld.tf/tfgrid_research/dev/projectmycelium
 | 
					cd /root/code/git.ourworld.tf/tfgrid/dev/projectmycelium
 | 
				
			||||||
git checkout development && git pull
 | 
					git checkout development && git pull
 | 
				
			||||||
zinit restart tf-marketplace-dev
 | 
					zinit restart projectmycelium-dev
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Production
 | 
					# Production
 | 
				
			||||||
ssh root@info.ourworld.tf
 | 
					ssh root@info.ourworld.tf
 | 
				
			||||||
cd /root/code/git.ourworld.tf/tfgrid_research/prod/projectmycelium
 | 
					cd /root/code/git.ourworld.tf/tfgrid/prod/projectmycelium
 | 
				
			||||||
git checkout main && git pull
 | 
					git checkout main && git pull
 | 
				
			||||||
zinit restart tf-marketplace-prod
 | 
					zinit restart projectmycelium-prod
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Creating a Gitea Personal Access Token
 | 
					### Creating a Gitea Personal Access Token
 | 
				
			||||||
@@ -264,14 +264,14 @@ To update the application after making changes:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
```bash
 | 
					```bash
 | 
				
			||||||
# Go to the repository directory
 | 
					# Go to the repository directory
 | 
				
			||||||
cd /root/code/git.ourworld.tf/tfgrid_research/projectmycelium
 | 
					cd /root/code/git.ourworld.tf/tfgrid/projectmycelium
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Pull the latest changes
 | 
					# Pull the latest changes
 | 
				
			||||||
git checkout main
 | 
					git checkout main
 | 
				
			||||||
git pull
 | 
					git pull
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Restart the application service
 | 
					# Restart the application service
 | 
				
			||||||
zinit restart tf-marketplace-prod
 | 
					zinit restart projectmycelium-prod
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Monitoring the Application
 | 
					## Monitoring the Application
 | 
				
			||||||
@@ -283,10 +283,10 @@ You can monitor the application status with these commands:
 | 
				
			|||||||
zinit list
 | 
					zinit list
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# View application logs
 | 
					# View application logs
 | 
				
			||||||
zinit log tf-marketplace-prod
 | 
					zinit log projectmycelium-prod
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Monitor logs in real-time
 | 
					# Monitor logs in real-time
 | 
				
			||||||
tail -f /var/log/zinit/tf-marketplace-prod.log
 | 
					tail -f /var/log/zinit/projectmycelium-prod.log
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Troubleshooting
 | 
					## Troubleshooting
 | 
				
			||||||
@@ -296,7 +296,7 @@ tail -f /var/log/zinit/tf-marketplace-prod.log
 | 
				
			|||||||
Check for errors in the application logs:
 | 
					Check for errors in the application logs:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```bash
 | 
					```bash
 | 
				
			||||||
zinit log tf-marketplace-prod
 | 
					zinit log projectmycelium-prod
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Connection Refused
 | 
					### Connection Refused
 | 
				
			||||||
@@ -304,5 +304,5 @@ zinit log tf-marketplace-prod
 | 
				
			|||||||
Make sure the application is running and listening on the correct port:
 | 
					Make sure the application is running and listening on the correct port:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```bash
 | 
					```bash
 | 
				
			||||||
ss -tuln | grep 9999
 | 
					ss -tuln | grep 9989
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
		Reference in New Issue
	
	Block a user