bzl

self-hosted ephemeral community engine
Log | Files | Refs | README | LICENSE

SERVER_UPDATE.md (1744B)


      1 # Updating a Live Bzl Server
      2 
      3 This is the standard update flow when Bzl is running from a git checkout + Docker Compose on your host.
      4 
      5 ## Single instance update (quick path)
      6 
      7 ```bash
      8 cd ~/Bzl
      9 git status
     10 git checkout main
     11 git fetch origin
     12 git pull --ff-only origin main
     13 docker compose up -d --build --remove-orphans
     14 ```
     15 
     16 ## Update every detected Bzl instance on the host
     17 
     18 Use this when you have multiple instance folders (for example `/root/Bzl`, `/opt/bzl-tawky`, `/opt/bzl-unianetwork`).
     19 
     20 ```bash
     21 cd /root/Bzl
     22 npm ci --omit=dev
     23 
     24 # preview only
     25 npm run instances:update -- --roots=/root,/srv,/opt,/home --max-depth=7 --dry-run
     26 
     27 # execute
     28 npm run instances:update -- --roots=/root,/srv,/opt,/home --max-depth=7
     29 ```
     30 
     31 The updater runs per instance:
     32 1. `git fetch`
     33 2. `git checkout main`
     34 3. `git pull --ff-only origin main`
     35 4. `docker compose up -d --build --remove-orphans`
     36 
     37 ## Restart all detected instances (no pull, no rebuild)
     38 
     39 Use this if you only changed env values or need a service restart.
     40 
     41 ```bash
     42 cd /root/Bzl
     43 npm run instances:update -- --roots=/root,/srv,/opt,/home --max-depth=7 --skip-git --skip-build
     44 ```
     45 
     46 ## Common failures
     47 
     48 - `fatal: not a git repository`: you are in the wrong folder. `cd` into the repo root first.
     49 - `npm: command not found`: install Node.js/npm on the host, then retry.
     50 - `Target path is not empty` during `instance:create`: use an empty folder, or create manually in an existing clone.
     51 
     52 ## Validation checklist
     53 
     54 ```bash
     55 docker ps
     56 curl -fsS http://127.0.0.1:<PORT>/api/health
     57 docker logs --tail 80 <container-name>
     58 ```
     59 
     60 Replace `<PORT>` and `<container-name>` per instance.
     61 
     62 ## Related docs
     63 
     64 - `docs/INSTANCE_FLEET_AUTOMATION.md`
     65 - `docs/MULTI_INSTANCE_DOCKER.md`
     66 - `docs/DIGITALOCEAN_DEPLOYMENT_AND_COST.md`