This commit is contained in:
ponzischeme89
2026-08-17 13:13:10 +12:00
parent 12b27c77c3
commit 43ab18854c
39 changed files with 1707 additions and 1528 deletions
+10 -13
View File
@@ -80,7 +80,7 @@ docker compose up -d --build # from the repo root; needs .env (see .env.e
```powershell
.\deploy-server.ps1 # local tree -> 10.0.0.213:/share/Docker/Memby
.\deploy-server.ps1 -SourceDirectory C:\src\memby -Destination /share/Docker/Memby-test
.\deploy-server.ps1 -SkipAppRelease -SkipBuilder # server/admin-only; reuse Android builder image
.\deploy-server.ps1 -SkipAppRelease # server/admin-only; no APK is built
```
It tars the local `server/`, `docker-compose.yml` and `.env.example`, and streams them over
@@ -88,9 +88,9 @@ one SSH connection (interactive password; stdin carries the
archive, so OpenSSH prompts on the tty). The remote half stages into
`<destination>.new.$$`, builds, then swaps directories and waits for all three health
checks, restoring the previous release if anything fails. The named Postgres volume is
preserved — it never runs `compose down -v`. For a server/admin-only change, combine
`-SkipAppRelease -SkipBuilder`: this skips the local APK build and preserves the running
Android builder container and image while only the gateway and admin console are replaced.
preserved — it never runs `compose down -v`. For a server/admin-only change, pass
`-SkipAppRelease`: this skips the local APK build so only the gateway and admin console are
replaced.
**`.env.example` is the configuration.** It holds real values, and every deployment
overwrites the NAS's `.env` with the local copy (the old one is kept beside it as
@@ -129,15 +129,12 @@ patch` (0.1.53 → 153). Bump both together — the in-app updater compares `ver
while Android refuses an APK whose `versionCode` went backwards. `release.ps1 -Version`
rewrites both, so prefer it over editing the build file by hand.
**Releases.** APKs are self-hosted (NAS or any web server), not on a store. The preferred
The normal NAS path is Admin Console → App updates → **Build latest release**. The isolated
service under `builder/` fetches the highest semantic GitHub tag, builds that exact source,
verifies the APK and publishes it through the gateway into the shared `memby-releases`
volume. An exact tag may be selected as a deliberate fallback, and
`docker compose run --rm --build memby-builder release` remains the controller-independent
command-line fallback. Its keystore, signing credentials and release-publish token are
read-only Compose secrets under `/run/secrets`; the Gradle cache is a named volume. See
`builder/README.md`.
**Releases.** APKs are self-hosted (NAS or any web server), not on a store. An APK is built
on a workstation or by CI and published to the gateway through `POST /admin/api/release`,
which stores it in the shared `memby-releases` volume — either by `deploy-server.ps1` (which
builds, signs, verifies and publishes in the same operation) or by
`.gitea/workflows/release.yml` on a pushed semantic tag. The gateway itself builds nothing;
its release-publish token is a read-only Compose secret under `/run/secrets`.
The existing `release.ps1` compatibility path builds a signed APK and assembles
`dist/out/``index.html` (landing page from `dist/template/`), `latest.json` (the manifest