Migration 20261021090000 + sidecar + both frontends live on the VM. Baseline-guarded, backed up (szlang-20261020T211211Z), rollback-tagged. Prod function defs verified byte-identical to local post-migrate; live gridsmart sync through the new transform: 30 updates, 0 errors, level/area untouched. language null until the organizer defines the category. Co-authored-by: Stephan Charles <[email protected]> Co-authored-by: Amelia Hernandez <[email protected]> Co-authored-by: Markus Franz <[email protected]> Co-authored-by: Sabrina Hota <[email protected]> Co-authored-by: Nilüfer Doğan <[email protected]>
251 lines
9.8 KiB
Markdown
251 lines
9.8 KiB
Markdown
# Deployment — VM Access
|
||
|
||
Convivo runs locally for development and on the production VM at
|
||
`/home/APPE/convivo`. The VM is a flat file copy, not a Git checkout. See
|
||
[backend/supabase-core.md](./backend/supabase-core.md) and
|
||
[backend/docker.md](./backend/docker.md) for service ownership.
|
||
|
||
## Production status (2026-10-21)
|
||
|
||
> **This table and its evidence block describe the 2026-10-07 deploy** — its
|
||
> bundle markers (`index-Gv3o7AW6.js` / `index-CocPCSGt.js`) were superseded many
|
||
> times since. Dated deployment evidence lives in [releases/](./releases/).
|
||
> Last deploy **2026-10-21** ([record](./releases/2026-10-20.md#followup-session-language-tag-deployed-2026-10-21)):
|
||
> served bundles `index-H78RjZbM.js` (admin) and `index-BeolCmUg.js` (attendee);
|
||
> migration `20261021090000` applied (sessions.language); sidecar rebuilt;
|
||
> backup `/home/APPE/convivo-backups/szlang-20261020T211211Z`; rollback tags
|
||
> `convivo-{app,admin,sidecar}:rollback-szlang-20261020T211211Z`. The previous
|
||
> full deploy 2026-10-20 ([record](./releases/2026-10-20.md)) served
|
||
> `index-Bvxa-AGu.js`/`index-CI1zhQx2.js` with migrations `20261020120000` +
|
||
> `20261020130000`; before that 2026-10-19
|
||
> ([record](./releases/2026-10-19.md)) served
|
||
> `index-CvbBKcXb.js`/`index-D4o4lQL7.js` with migration `20261019160000`.
|
||
|
||
| Public URL | Role | Verified result |
|
||
|---|---|---|
|
||
| `https://convivo.appe.at` | Attendee app | DNS points to `68.210.96.53`; valid TLS; HTTP 200 |
|
||
| `https://convivo.appe.at/speaker` | Speaker portal | HTTP 200 SPA route |
|
||
| `https://convivo.appe.at/speaker/secret` | Speaker portal alternate entry | HTTP 200 SPA route |
|
||
| `https://admin.appe.at` | Admin console | DNS points to the VM; valid TLS; HTTP 200 |
|
||
| `https://admin.appe.at/auth/callback` | Admin magic-link callback | HTTP 200 SPA, not an Auth 404 |
|
||
| `https://convivo.appe.at/auth/v1` | Public Supabase Auth | `/health` returns 200; `/verify` without a token returns expected 400 |
|
||
| `https://db.appe.at` | Reserved database/API domain | No DNS record; not used by this deployment |
|
||
|
||
Nginx Proxy Manager routes the attendee and Admin domains to host ports 3000
|
||
and 3001. Both apps proxy same-origin Supabase API paths to
|
||
`supabase_kong_Convivo:8000` on `supabase_network_Convivo`.
|
||
|
||
### Deployment evidence
|
||
|
||
- Supabase CLI remains **2.115.0** at `~/.supabase/bin/supabase`; every core
|
||
container image ID and the Auth JWT secret/issuer were unchanged after the
|
||
volume-preserving stop/start. Frontends were built before the interruption.
|
||
- Only the approved 10 frontend runtime files and three speaker migrations
|
||
were transferred. The VM baseline predates local Reports/networking changes:
|
||
tracked feature diffs were applied against backed-up VM source, excluding
|
||
unchanged Reports-only patch context. Unrelated views, dependencies and
|
||
migrations were not deployed. Manifests, lockfiles, app dotenv files and
|
||
Compose configuration were preserved.
|
||
- Applied and verified migration versions: `20261006175622` (empty history
|
||
entry), `20261006175631`, and `20261007153957`. Each missing migration and its
|
||
statement-array history entry were committed in one transaction. No reset,
|
||
seed, fixture sync, user creation, Git commit or Git reset was performed.
|
||
- The protected backup directory is
|
||
`/home/APPE/convivo-backups/20261007T155959Z` (directory mode 0700; artifacts
|
||
0600). It contains a full `postgres.dump`, a second pre-restart database dump,
|
||
source/config backups, private runtime metadata, and validation summaries.
|
||
Old frontend images remain tagged
|
||
`convivo-app:rollback-20261007T155959Z` and
|
||
`convivo-admin:rollback-20261007T155959Z`; no rollback was needed.
|
||
- All pre-deployment records were preserved. Counts changed from 68 to 84
|
||
contacts, 121 to 137 Auth users, and 67 to 83 registrations while the existing
|
||
Pretix-enabled sidecar kept running. Events (1), sessions (21), and storage
|
||
objects (1) stayed constant. Archive-to-live key comparisons found zero
|
||
missing records; CLI startup showed no seed execution.
|
||
- Core services and both frontends are healthy; all three nginx configuration
|
||
checks passed; sidecar `/health` returns 200. Served build markers are
|
||
`index-Gv3o7AW6.js` (attendee/speaker) and `index-CocPCSGt.js` (Admin).
|
||
- Lago's existing Auth account and eligible Admin contact were verified, with
|
||
two eligible speaker-portal sessions. One authorized Admin magic-link request
|
||
to `[email protected]` returned HTTP 200 with `create_user = false`. Inbox receipt,
|
||
consuming the email link, and browser screenshots were not verified.
|
||
|
||
SMTP, exact redirects, issuer preservation and private dotenv provisioning are
|
||
documented in [Production Auth](./backend/supabase-core.md#production-activation-2026-10-07).
|
||
|
||
## VM credentials
|
||
|
||
The access details are stored **base64-encoded**. The string below decodes to a
|
||
JSON object with the properties `IP`, `user`, and `pass`.
|
||
|
||
```
|
||
***REMOVED***
|
||
```
|
||
|
||
### Decode it
|
||
|
||
```bash
|
||
# Linux / macOS
|
||
echo '***REMOVED***' | base64 -d
|
||
# -> {"IP":"68.210.96.53","user":"APPE","pass":"***REMOVED***"}
|
||
|
||
# Windows (PowerShell)
|
||
[Text.Encoding]::UTF8.GetString([Convert]::FromBase64String('***REMOVED***'))
|
||
```
|
||
|
||
Decoded JSON:
|
||
|
||
```json
|
||
{
|
||
"IP": "68.210.96.53",
|
||
"user": "APPE",
|
||
"pass": "***REMOVED***"
|
||
}
|
||
```
|
||
|
||
## Portainer credentials
|
||
|
||
Portainer CE runs on the VM (`:9000` web, `:9443` HTTPS). Its admin login is
|
||
stored in the same **base64-encoded JSON** format as the VM credentials above.
|
||
|
||
```
|
||
***REMOVED***
|
||
```
|
||
|
||
### Decode it
|
||
|
||
```bash
|
||
# Linux / macOS
|
||
echo '***REMOVED***' | base64 -d
|
||
# -> {"IP":"68.210.96.53","user":"admin","pass":"***REMOVED***"}
|
||
|
||
# Windows (PowerShell)
|
||
[Text.Encoding]::UTF8.GetString([Convert]::FromBase64String('***REMOVED***'))
|
||
```
|
||
|
||
Decoded JSON:
|
||
|
||
```json
|
||
{
|
||
"IP": "68.210.96.53",
|
||
"user": "admin",
|
||
"pass": "***REMOVED***"
|
||
}
|
||
```
|
||
|
||
> **Setup token:** a fresh Portainer install (after clearing the `portainer_data`
|
||
> volume) requires a one-time **setup token** to create the admin account. It is
|
||
> printed in the container logs: `docker logs portainer | grep setup_token`.
|
||
> The token rotates on every (re)start, so read it from the logs at setup time.
|
||
|
||
## Nginx Proxy Manager (NPM) credentials
|
||
|
||
NPM runs on the VM. In this instance the **admin UI is served on port 81**
|
||
(not the default 8181 — the container's `production.conf` puts the admin
|
||
interface on 81, and 8181/8182 are unbound). Its admin login is stored in the
|
||
same **base64-encoded JSON** format as the credentials above.
|
||
|
||
```
|
||
***REMOVED***=
|
||
```
|
||
|
||
### Decode it
|
||
|
||
```bash
|
||
# Linux / macOS
|
||
echo '***REMOVED***=' | base64 -d
|
||
# -> {"IP":"68.210.96.53","user":"[email protected]","pass":"***REMOVED***"}
|
||
|
||
# Windows (PowerShell)
|
||
[Text.Encoding]::UTF8.GetString([Convert]::FromBase64String('***REMOVED***='))
|
||
```
|
||
|
||
Decoded JSON:
|
||
|
||
```json
|
||
{
|
||
"IP": "68.210.96.53",
|
||
"user": "[email protected]",
|
||
"pass": "***REMOVED***"
|
||
}
|
||
```
|
||
|
||
> **Fresh install:** NPM's data (admin login + proxy hosts) lives in the
|
||
> `npm_data` volume (mounted at `/data`). To reset it, stop the container, wipe
|
||
> the volume contents, and restart — the API then reports `"setup": false` and
|
||
> the admin UI shows the "Create admin account" screen.
|
||
|
||
## Running services
|
||
|
||
The full stack is deployed on the VM (Docker). Host-exposed ports:
|
||
|
||
| Container | Host port(s) | What it is |
|
||
|---|---|---|
|
||
| `convivo-app` | 3000 | Attendee PWA |
|
||
| `convivo-admin` | 3001 | APPE Admin console |
|
||
| `convivo-sidecar` | 3002 | Sessionize sync sidecar |
|
||
| `supabase_kong_Convivo` | 54321 | Kong API gateway |
|
||
| `supabase_db_Convivo` | 54322 | Postgres 17 |
|
||
| `supabase_studio_Convivo` | 54323 | Supabase Studio |
|
||
| `supabase_inbucket_Convivo` | 54324 | Mailpit (email capture) |
|
||
| `supabase_analytics_Convivo` | 54327 | Logflare analytics |
|
||
| `portainer` | 9000, 9443 | Portainer CE |
|
||
| `nginx-proxy-manager` | 81 (admin UI + proxied sites), 8181–8182 (published but unbound) | Nginx Proxy Manager |
|
||
|
||
## Connecting
|
||
|
||
**Key-based auth is set up** (the developer's `~/.ssh/id_ed25519` public key is
|
||
in `[email protected]:~/.ssh/authorized_keys`). On a machine with that key, no
|
||
password is needed:
|
||
|
||
```bash
|
||
ssh [email protected]
|
||
# or, with the `convivo-vm` alias in ~/.ssh/config:
|
||
ssh convivo-vm
|
||
```
|
||
|
||
Password fallback (if the key is unavailable):
|
||
|
||
```bash
|
||
ssh [email protected]
|
||
# password: ***REMOVED***
|
||
```
|
||
|
||
### Port-forward tunnel (access the stack from a laptop)
|
||
|
||
The full stack runs on the VM. To reach it from a local machine, forward the
|
||
service ports over SSH (no password needed with the key above):
|
||
|
||
```bash
|
||
ssh -N -L 3000:127.0.0.1:3000 -L 3001:127.0.0.1:3001 -L 3002:127.0.0.1:3002 \
|
||
-L 54321:127.0.0.1:54321 -L 54322:127.0.0.1:54322 -L 54323:127.0.0.1:54323 \
|
||
-L 54324:127.0.0.1:54324 -L 54327:127.0.0.1:54327 \
|
||
-L 9000:127.0.0.1:9000 -L 9443:127.0.0.1:9443 \
|
||
-L 8081:127.0.0.1:81 \
|
||
-o ServerAliveInterval=30 -o ServerAliveCountMax=3 convivo-vm
|
||
```
|
||
|
||
| Local URL | Service |
|
||
|---|---|
|
||
| http://localhost:3000 | Convivo attendee app |
|
||
| http://localhost:3001 | APPE Admin |
|
||
| http://localhost:3002/health | Sync sidecar |
|
||
| http://localhost:54321 | Kong API |
|
||
| `postgresql://postgres:postgres@localhost:54322/postgres` | Postgres |
|
||
| http://localhost:54323 | Supabase Studio (`postgres`/`postgres`) |
|
||
| http://localhost:54324 | Mailpit |
|
||
| http://localhost:54327 | Logflare |
|
||
| http://localhost:9000 | Portainer CE (`admin`/`***REMOVED***`) |
|
||
| http://localhost:8081 | NPM admin UI (`[email protected]`/`***REMOVED***`) |
|
||
|
||
> NPM's admin UI is on the VM's port **81**, forwarded to local **8081** (81 is
|
||
> a privileged port and can't be bound locally without root). The apps proxy
|
||
> their Supabase calls to Kong over the shared Docker network, so only the app
|
||
> ports are needed for the UI; `54321`/`54322`/`54323` are for direct
|
||
> API/DB/Studio access.
|
||
|
||
> **Security note:** the password above is a live credential committed to the
|
||
> repository for convenience. Key-based auth is the preferred path; rotate the
|
||
> password if the repo is ever exposed, and treat the repo as readable by anyone
|
||
> with access.
|