Explorar o código

README: fix the first-deploy and sites.json steps

- Create the site folder with mkdir -m 2775 so webops members (Claude
  included) can write to it, and make the first deploy either bajdev's
  rsync or Claude's deploy-static, not both, since whoever deploys first
  owns the files.
- The sites.json step referenced a gotest static entry that doesn't
  exist and a 'content folder' key static sites don't use. Give the
  actual entry; static sites publish public/ unless "dir" says otherwise.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude hai 13 horas
pai
achega
8aacfe00ad
Modificáronse 1 ficheiros con 28 adicións e 7 borrados
  1. 28 7
      README.md

+ 28 - 7
README.md

@@ -54,15 +54,29 @@ DNS needs no change: the `@` and `*` A records at Hover already point here.
 
 
 2. **Site folder and first deploy.**
 2. **Site folder and first deploy.**
 
 
+   Create the folder group-writable. It inherits the `webops` group from
+   `/srv/www/vhosts`, and mode `2775` lets every `webops` member, Claude
+   included, write to it:
+
+   ```bash
+   mkdir -m 2775 /srv/www/vhosts/monoexp.com
+   ```
+
+   Then do the first deploy, **either** yourself:
+
    ```bash
    ```bash
-   mkdir /srv/www/vhosts/monoexp.com
    git clone git@git.monoexp.com:bajdev/home.git ~/src/home
    git clone git@git.monoexp.com:bajdev/home.git ~/src/home
    rsync -a --delete ~/src/home/public/ /srv/www/vhosts/monoexp.com/
    rsync -a --delete ~/src/home/public/ /srv/www/vhosts/monoexp.com/
    ```
    ```
 
 
-   (From Claude's account the same step is
-   `deploy-static monoexp.com ~/src/home/public`; pass the source folder
-   explicitly, since the script's default would look for `~/src/monoexp/public`.)
+   **or** by asking Claude, which runs
+   `deploy-static monoexp.com ~/src/home/public` from its own account. Pass
+   the source folder explicitly, because the script's default would look for
+   `~/src/monoexp/public`.
+
+   Pick one, not both: whoever deploys first owns the files, and the other
+   account then can't update them. Merge-to-deploy hands them to the `deploy`
+   user afterwards either way.
 
 
 3. **nginx.**
 3. **nginx.**
 
 
@@ -83,9 +97,16 @@ DNS needs no change: the `@` and `*` A records at Hover already point here.
 
 
 Same steps as any other site on the pipeline (see the VPS setup plan, Phase 7):
 Same steps as any other site on the pipeline (see the VPS setup plan, Phase 7):
 
 
-1. In `bajdev/devops`, add `bajdev/home` to `sites.json` through a PR, modelled
-   on the existing static entry for gotest, with host `monoexp.com` and
-   content folder `public`. Merge, then reinstall the file:
+1. In `bajdev/devops`, add `bajdev/home` to `sites.json` through a PR, as a
+   static site:
+
+   ```json
+   "bajdev/home": { "kind": "static", "host": "monoexp.com" }
+   ```
+
+   A static site publishes the repo's `public/` folder by default. To publish
+   a different folder, add `"dir": "<folder>"`. Merge, then reinstall the
+   file:
    `sudo install -o root -g root -m 644 sites.json /etc/deployd/sites.json`
    `sudo install -o root -g root -m 644 sites.json /etc/deployd/sites.json`
 2. Hand the deployed files to the deploy user:
 2. Hand the deployed files to the deploy user:
    `sudo chown -R deploy /srv/www/vhosts/monoexp.com`
    `sudo chown -R deploy /srv/www/vhosts/monoexp.com`