Add env-driven SMTP and app identity settings for PocketBase
- pb_hooks/main.pb.js: bootstrap hook applying SMTP + meta settings from env vars on every boot (mail disabled when SMTP_HOST is unset) - docker-compose.yml: expose SMTP_* / PB_APP_URL on the pocketbase service - pocketbase/Dockerfile: bundle pb_hooks - README: document the new variables
This commit is contained in:
@@ -30,6 +30,20 @@ Node >= 22.12.
|
||||
| ---------------- | -------------------------------------------- | ------------------------------------ |
|
||||
| `POCKETBASE_URL` | URL of the PocketBase backend (auth + data) | `https://pokeshare.namarusaja.me` |
|
||||
|
||||
PocketBase container (compose only):
|
||||
|
||||
| Variable | Description |
|
||||
| ------------------------------------ | ------------------------------------------------- |
|
||||
| `PB_SUPERUSER_EMAIL` / `_PASSWORD` | Create/update the admin account on boot |
|
||||
| `PB_APP_URL` | Public app URL used in transactional email links |
|
||||
| `SMTP_HOST` / `SMTP_PORT` | Mail server (mail disabled if `SMTP_HOST` empty) |
|
||||
| `SMTP_USERNAME` / `SMTP_PASSWORD` | Mail server credentials |
|
||||
| `SMTP_TLS` | `true` (default) / `false` |
|
||||
| `SMTP_SENDER_NAME` / `_ADDRESS` | From header of transactional emails |
|
||||
|
||||
SMTP settings are applied on every boot by `pocketbase/pb_hooks/main.pb.js`
|
||||
from these env vars, so they can be changed without touching the admin UI.
|
||||
|
||||
Read at **runtime** (`process.env`), so the same Docker image can be deployed
|
||||
against different PocketBase instances. For local dev, copy `.env.example` to
|
||||
`.env`. `HOST` and `PORT` are also honored by the standalone server.
|
||||
|
||||
Reference in New Issue
Block a user