diff --git a/docs/ops/method/current/deployment.md b/docs/ops/method/current/deployment.md index 8e4df8c..f8a4fff 100644 --- a/docs/ops/method/current/deployment.md +++ b/docs/ops/method/current/deployment.md @@ -21,11 +21,11 @@ We'll clone the repository to a structured directory path: ```bash # Create directory structure -mkdir -p /root/code/git.ourworld.tf/tfgrid_research/ -cd /root/code/git.ourworld.tf/tfgrid_research/ +mkdir -p /root/code/git.ourworld.tf/tfgrid/prod +cd /root/code/git.ourworld.tf/tfgrid/prod # Clone the repository -git clone https://git.ourworld.tf/tfgrid_research/projectmycelium +git clone https://git.ourworld.tf/tfgrid/projectmycelium cd projectmycelium git checkout main ``` @@ -38,34 +38,34 @@ Create a zinit service to run and manage the application: ```bash mkdir -p /etc/zinit/cmds -nano /etc/zinit/cmds/tf-marketplace.sh +nano /etc/zinit/cmds/projectmycelium.sh ``` Add the following content: ```bash #!/bin/bash -cd /root/code/git.ourworld.tf/tfgrid_research/projectmycelium +cd /root/code/git.ourworld.tf/tfgrid/prod/projectmycelium 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: ```bash -chmod +x /etc/zinit/cmds/tf-marketplace.sh +chmod +x /etc/zinit/cmds/projectmycelium-prod.sh ``` 2. Create the zinit service definition: ```bash -nano /etc/zinit/tf-marketplace.yaml +nano /etc/zinit/projectmycelium-prod.yaml ``` Add the following content: ```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 ``` - 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 { - reverse_proxy localhost:9999 { +projectmycelium.org { + reverse_proxy localhost:9989 { header_up Host {host} header_up X-Real-IP {remote} header_up X-Forwarded-Proto {scheme} @@ -100,14 +100,14 @@ threefold.pro { - Monitor the zinit service ``` -zinit monitor tf-marketplace-prod +zinit monitor projectmycelium-prod ``` - Start the service ```bash # Start the marketplace service -zinit start tf-marketplace-prod +zinit start projectmycelium-prod # Restart Caddy to load new configuration zinit restart caddy @@ -154,9 +154,9 @@ make setup 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) -└── prod/projectmycelium/ # Production branch (port 9999) +└── prod/projectmycelium/ # Production branch (port 9989) ``` **Benefits:** @@ -171,13 +171,13 @@ The deployment system uses industry-standard environment separation: - Sets up development environment only - Clones to `dev/projectmycelium/` - Uses development branch -- Runs on port 9998 (dev.threefold.pro) +- Runs on port 9998 (dev.projectmycelium.org) **setup-prod:** - Sets up production environment only - Clones to `prod/projectmycelium/` - Uses main branch -- Runs on port 9999 (threefold.pro) +- Runs on port 9989 (projectmycelium.org) - Restarts Caddy for production **setup (both):** @@ -217,15 +217,15 @@ make help ```bash # Development 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 -zinit restart tf-marketplace-dev +zinit restart projectmycelium-dev # Production 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 -zinit restart tf-marketplace-prod +zinit restart projectmycelium-prod ``` ### Creating a Gitea Personal Access Token @@ -264,14 +264,14 @@ To update the application after making changes: ```bash # 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 git checkout main git pull # Restart the application service -zinit restart tf-marketplace-prod +zinit restart projectmycelium-prod ``` ## Monitoring the Application @@ -283,10 +283,10 @@ You can monitor the application status with these commands: zinit list # View application logs -zinit log tf-marketplace-prod +zinit log projectmycelium-prod # Monitor logs in real-time -tail -f /var/log/zinit/tf-marketplace-prod.log +tail -f /var/log/zinit/projectmycelium-prod.log ``` ## Troubleshooting @@ -296,7 +296,7 @@ tail -f /var/log/zinit/tf-marketplace-prod.log Check for errors in the application logs: ```bash -zinit log tf-marketplace-prod +zinit log projectmycelium-prod ``` ### Connection Refused @@ -304,5 +304,5 @@ zinit log tf-marketplace-prod Make sure the application is running and listening on the correct port: ```bash -ss -tuln | grep 9999 +ss -tuln | grep 9989 ``` \ No newline at end of file