Add one-command dev-to-prod release with clear SUCCESS/FAILED banners.
Introduce devtoprod:release orchestrator, config file, CLI result footers on deploy scripts, auto-thumb regeneration on curator fixes, and updated deploy documentation. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
313666a4ab
commit
21e3e41e48
+25
-8
@@ -217,7 +217,10 @@ npm run dev:discover-influences # discovery only, no curated insert
|
||||
| `npm run dev:fetch-images` | Search/download missing painting files (alias: `search-missing-paintings`) |
|
||||
| `npm run dev:fetch-artist-images` | Download or link artist portraits |
|
||||
| `npm run dev:sync-image-paths` | Align DB paths with files on disk; import new rows |
|
||||
| `npm run dev:regenerate-thumbnails` | Rebuild all thumbs from full images |
|
||||
| `npm run dev:regenerate-thumbnails` | Rebuild painting thumbs from full images |
|
||||
| `npm run dev:regenerate-portrait-thumbs` | Rebuild timeline portrait thumbs (~256px) |
|
||||
| `npm run devtoprod:thumbnails` | Both of the above — run on dev before promote backup/sync |
|
||||
| `npm run devtoprod:release` | Config-driven full promote (see [deploy-dev-to-prod.md](deploy-dev-to-prod.md#one-command-release-automated)) |
|
||||
|
||||
**Local paths:** `data/images/portraits/`, `data/images/paintings/`, `data/images/paintings/thumbs/`
|
||||
|
||||
@@ -230,11 +233,13 @@ SMB share **`Gallery`** → `/mnt/BasePool/Applications/Gallery` on TrueNAS.
|
||||
```powershell
|
||||
net use \\192.168.10.122\Gallery /user:YOUR_TRUENAS_USER
|
||||
|
||||
npm run devtoprod:release # full promote from infra/deploy/devtoprod.config.json
|
||||
npm run devtoprod:thumbnails # rebuild thumb files + DB paths on dev (before backup)
|
||||
npm run devtoprod:images # dev repo → TrueNAS (promote / first deploy)
|
||||
npm run prodto:dev:images # TrueNAS → dev repo
|
||||
```
|
||||
|
||||
Type `yes` when prompted. Robocopy exit codes **0–7** = success.
|
||||
Type `yes` when prompted (or set `autoConfirm: true` in release config). Robocopy exit codes **0–7** = success. Deploy scripts print a final **`===== SUCCESS =====`** or **`===== FAILED =====`** banner.
|
||||
|
||||
---
|
||||
|
||||
@@ -291,13 +296,25 @@ Expect JSON with `min_year` / `max_year`. HTML shell only from `curl` on `/` is
|
||||
|
||||
~Weekly (or when explicitly releasing to prod). Not part of daily dev. Full runbook with per-change decision matrix and rollback: [deploy-dev-to-prod.md](deploy-dev-to-prod.md).
|
||||
|
||||
**One command (recommended):** copy `infra/deploy/devtoprod.config.example.json` → `infra/deploy/devtoprod.config.json`, edit SMB/git settings, then:
|
||||
|
||||
```powershell
|
||||
npm run devtoprod:release
|
||||
# or: deploy-dev-to-prod.cmd
|
||||
```
|
||||
|
||||
Dry-run: `npm run devtoprod:release -- -DryRun`. The script pauses for a manual **gallery-web** restart on TrueNAS before verify.
|
||||
|
||||
**Manual steps** (partial releases):
|
||||
|
||||
1. Test on https://devgallery.mysuperlab.netcraze.pro
|
||||
2. `npm run dev:db:backup`
|
||||
3. `npm run devtoprod:db:restore -- --file db/DataBackup/gallery_dev_data_....txt` (if DB/catalog changed)
|
||||
4. `npm run devtoprod:images` (if images changed)
|
||||
5. `npm run prod:docker:publish` (if code changed)
|
||||
6. Restart **gallery-web** on TrueNAS
|
||||
7. Verify https://gallery.mysuperlab.netcraze.pro
|
||||
2. `npm run devtoprod:thumbnails` (if paintings/portraits changed — rebuild thumb files + DB paths on dev)
|
||||
3. `npm run dev:db:backup`
|
||||
4. `npm run devtoprod:db:restore -- --file db/DataBackup/gallery_dev_data_....txt` (if DB/catalog changed)
|
||||
5. `npm run devtoprod:images` (if images changed)
|
||||
6. `npm run prod:docker:publish` (if code changed)
|
||||
7. Restart **gallery-web** on TrueNAS
|
||||
8. Verify https://gallery.mysuperlab.netcraze.pro
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user