diff --git a/package-lock.json b/package-lock.json index 98ef0b80..4f1343b5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "imwald", - "version": "23.0.1", + "version": "23.0.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "imwald", - "version": "23.0.1", + "version": "23.0.2", "license": "MIT", "dependencies": { "@asciidoctor/core": "^3.0.4", diff --git a/package.json b/package.json index 8f3957bf..cf705e55 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "imwald", - "version": "23.0.1", + "version": "23.0.3", "description": "Imwald — a user-friendly Nostr client focused on relay feed browsing, publications, and relay discovery", "private": true, "type": "module", diff --git a/scripts/README-deploy.md b/scripts/README-deploy.md index 12903756..cd9398f0 100644 --- a/scripts/README-deploy.md +++ b/scripts/README-deploy.md @@ -58,11 +58,9 @@ docker compose -f docker-compose.prod.yml up -d That starts the **full** stack in `docker-compose.prod.yml` (app, NIP-66 monitor, OG proxy, Piper, LanguageTool, LibreTranslate). The SPA is on **port 8089**; see `docker-compose.prod.yml` header for Apache paths. -**Grammar + translate in the browser** also require the SPA to be built with API paths baked in, for example: +**Grammar + translate:** `./scripts/build-and-push-prod.sh` now bakes in **`/api/languagetool`** and **`/api/translate`** by default (same as `.env.development`). Override with `LANGUAGE_TOOL_URL` / `TRANSLATE_URL` if your paths differ; set either to empty to omit that feature from the bundle. -`LANGUAGE_TOOL_URL=/api/languagetool TRANSLATE_URL=/api/translate ./scripts/build-and-push-prod.sh` - -and Apache (or nginx) must proxy `/api/languagetool` → `127.0.0.1:8010` and `/api/translate` → `127.0.0.1:5000`. +Apache (or nginx) must still proxy `/api/languagetool` → `127.0.0.1:8010` and `/api/translate` → `127.0.0.1:5000`. **Shared host:** if you already run another `og-proxy` on `127.0.0.0.1:8090` or another Wyoming Piper on the same ports, `docker compose up -d` can fail with a port or name conflict. Either stop the duplicates or start only the pieces you need, e.g. `docker compose up -d jumble jumble-nip66-monitor languagetool libretranslate` (and point `PIPER_TTS_HOST` / Apache at your existing Piper stack if applicable). diff --git a/scripts/build-and-push-prod.sh b/scripts/build-and-push-prod.sh index 1aec8a6e..46fa9ea0 100755 --- a/scripts/build-and-push-prod.sh +++ b/scripts/build-and-push-prod.sh @@ -12,8 +12,9 @@ # Alias: JUMBLE_PROXY_SERVER_URL (deprecated). Must match the public origin where Apache serves the app. # READ_ALOUD_TTS_URL — build-arg VITE_READ_ALOUD_TTS_URL (default /api/piper-tts). # Same-origin: Apache proxies /api/piper-tts → aitherboard (e.g. :9876). Override only if you use CORS on another host. -# LANGUAGE_TOOL_URL — build-arg VITE_LANGUAGE_TOOL_URL (default empty). Example: /api/languagetool with Apache → LanguageTool :8010. -# TRANSLATE_URL — build-arg VITE_TRANSLATE_URL (default empty). Example: /api/translate with Apache → LibreTranslate :5000. +# LANGUAGE_TOOL_URL — build-arg VITE_LANGUAGE_TOOL_URL (default /api/languagetool if unset). Same-origin Apache → LanguageTool :8010. +# TRANSLATE_URL — build-arg VITE_TRANSLATE_URL (default /api/translate if unset). Same-origin Apache → LibreTranslate :5000. +# Set either to an empty string to omit that feature from the bundle: LANGUAGE_TOOL_URL= TRANSLATE_URL= ./scripts/build-and-push-prod.sh set -e REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" @@ -30,8 +31,9 @@ IMAGE_PIPER_PROXY="silberengel/imwald-piper-tts-proxy" # Override: IMWALD_PROXY_SERVER_URL=https://other.example ./scripts/build-and-push-prod.sh PROXY_ORIGIN="${IMWALD_PROXY_SERVER_URL:-${JUMBLE_PROXY_SERVER_URL:-https://jumble.imwald.eu}}" READ_ALOUD_TTS_URL="${READ_ALOUD_TTS_URL:-/api/piper-tts}" -LANGUAGE_TOOL_URL="${LANGUAGE_TOOL_URL:-}" -TRANSLATE_URL="${TRANSLATE_URL:-}" +# Match .env.development and PROXY_SETUP.md (`:-` would force defaults even when empty; use `-` so LANGUAGE_TOOL_URL= disables). +LANGUAGE_TOOL_URL="${LANGUAGE_TOOL_URL-/api/languagetool}" +TRANSLATE_URL="${TRANSLATE_URL-/api/translate}" echo "Building main app (version: $VERSION, VITE_PROXY_SERVER=$PROXY_ORIGIN, VITE_READ_ALOUD_TTS_URL=$READ_ALOUD_TTS_URL, VITE_LANGUAGE_TOOL_URL=$LANGUAGE_TOOL_URL, VITE_TRANSLATE_URL=$TRANSLATE_URL)" docker build \