chore(deploy): expose flashcard on host port 4000 (4000:3000)

This commit is contained in:
2026-05-21 09:58:59 +02:00
parent 34b6c8d945
commit fe44e393b3
2 changed files with 10 additions and 7 deletions

View File

@@ -8,8 +8,10 @@ Repo: `https://gitea.hausmans.cloud/bert.hausmans/flashcards`
## What gets deployed
One container (`flashcard`) serving the API **and** the built frontend on port
`3000`, with a persistent named volume (`flashcard-data`) for the SQLite database.
One container (`flashcard`) serving the API **and** the built frontend. It listens
on port `3000` inside the container, mapped to **`4000` on the Dockge host**
(`4000:3000` in `compose.yaml`). A persistent named volume (`flashcard-data`) holds
the SQLite database.
Migrations run automatically on every container start.
## Step 1 — push the code to Gitea (from your dev machine)
@@ -35,7 +37,7 @@ A "flashcard" stack now appears in the Dockge UI (it reads `compose.yaml`).
Open the **flashcard** stack in Dockge and edit the `environment:` block:
- `APP_URL` → how you reach the app, e.g. `http://<dockge-host-ip>:3000`
- `APP_URL` → how you reach the app, e.g. `http://<dockge-host-ip>:4000`
(this is what verification/reset/invite e-mail links use — get it right).
- `COOKIE_SECURE` → leave `"false"` for now (plain HTTP). Flip to `"true"` only
after you put the app behind HTTPS.
@@ -46,7 +48,7 @@ Open the **flashcard** stack in Dockge and edit the `environment:` block:
Click **Deploy** (Dockge runs `docker compose up -d --build`). First build takes a
few minutes (installs deps, builds the frontend, compiles better-sqlite3). When it's
up, open `http://<dockge-host-ip>:3000`.
up, open `http://<dockge-host-ip>:4000`.
## Step 5 — create the first account (becomes sysadmin)