Add dev/prod environments with TrueNAS Docker production deploy.

Split PostgreSQL into gallery_dev and gallery_prod, add Docker/Gitea deploy tooling,
SMB image sync, pgAdmin split script, dev:web on Keenetic :5173, and operator docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Danila Khodjaef
2026-07-04 15:15:19 +03:00
co-authored by Cursor
parent 02d238b043
commit 2edf577faf
34 changed files with 1742 additions and 80 deletions
+23 -11
View File
@@ -7,6 +7,7 @@ Interactive virtual art gallery: zoomable historical timeline with era click-to-
| Document | Purpose |
|----------|---------|
| [Documentation/basics.md](Documentation/basics.md) | Architecture, layout, user flow |
| [Documentation/environments.md](Documentation/environments.md) | Dev/prod URLs, DB split, deploy, sync |
| [Documentation/setup.md](Documentation/setup.md) | Install, env, npm scripts |
| [Documentation/DB_structure.md](Documentation/DB_structure.md) | PostgreSQL tables |
| [Documentation/API.md](Documentation/API.md) | REST endpoints |
@@ -19,7 +20,7 @@ Interactive virtual art gallery: zoomable historical timeline with era click-to-
## Setup
1. Copy `.env.example` to `.env` and set database credentials.
1. Copy `.env.example` to `.env` and set database credentials (`DB_NAME=gallery_dev` after [one-time split](Documentation/environments.md)).
2. Install dependencies:
```bash
@@ -52,25 +53,36 @@ Interactive virtual art gallery: zoomable historical timeline with era click-to-
npm run fetch-images -- --artist="Claude Monet" # one artist in catalog order
```
5. Build the client and start the server:
5. **Development (public URL):**
```bash
npm run start:prod
npm run dev:web
```
**Production URLs:**
- Public: http://gallery.mysuperlab.netcraze.pro (via reverse proxy)
- LAN: http://192.168.10.70:3520
Open https://devgallery.mysuperlab.netcraze.pro (or http://localhost:5173 locally).
See [Documentation/setup.md](Documentation/setup.md#production-deployment) for nginx/systemd configs in `deploy/`.
**Production:** https://gallery.mysuperlab.netcraze.pro — see [Documentation/environments.md](Documentation/environments.md) and [infra/docker/DEPLOY-truenas.md](infra/docker/DEPLOY-truenas.md).
## Deployed URLs
| Environment | URL | Host |
|-------------|-----|------|
| Development | https://devgallery.mysuperlab.netcraze.pro | Dev PC `:5173` (Vite) + `:3451` (API) |
| Production | https://gallery.mysuperlab.netcraze.pro | TrueNAS Docker `:5173` |
Operator guide: [Documentation/environments.md](Documentation/environments.md).
## Development
Run API and Vite dev server separately:
**Public dev (Keenetic):**
```bash
npm run dev:server # API — PORT from .env (3520 or 3001)
npm run dev:client # http://localhost:5173 (proxies /api and /images)
npm run dev:web # Vite :5173, API :3451
```
Both processes must run when the public domain is proxied to Vite (`deploy/nginx-gallery.conf`).
**Local HMR:**
```bash
npm run dev:server # API — PORT from .env
npm run dev:client # http://localhost:5173 (proxies /api and /images)
```