4.0.1 - fixes
This commit is contained in:
@@ -36,6 +36,12 @@ containers untouched.
|
||||
- Server-side helper that updates only the `goodwalk-svelte` compose project.
|
||||
- [docker-compose.prod.yml](docker-compose.prod.yml)
|
||||
- Production compose file for the new Svelte app, mail API, and Postgres.
|
||||
- `scripts/export-homepage-content.mjs`
|
||||
- Local helper that exports the current `src/lib/content/homepage.ts` into a
|
||||
deployable JSON payload before each deployment.
|
||||
- `scripts/sync-homepage-content.mjs`
|
||||
- Runtime helper that upserts the exported homepage content into PostgreSQL
|
||||
after deploys that affect the app/database.
|
||||
- [ssh-config](ssh-config)
|
||||
- Repo-local SSH config used by the deployment script.
|
||||
- [nginx/goodwalk.co.nz.svelte.conf.example](nginx/goodwalk.co.nz.svelte.conf.example)
|
||||
@@ -61,9 +67,13 @@ mkdir -p /docker/goodwalk-svelte
|
||||
It is created from [deploy.env.template](deploy.env.template). Current template contents:
|
||||
|
||||
```env
|
||||
APP_VERSION=4.0.1
|
||||
TZ=Pacific/Auckland
|
||||
|
||||
POSTGRES_DB=goodwalk
|
||||
POSTGRES_USER=goodwalk
|
||||
POSTGRES_PASSWORD=gw_Pg_7Jm9!Qx4#Ld2@Vr8
|
||||
POSTGRES_PASSWORD_URLENCODED=gw_Pg_7Jm9%21Qx4%23Ld2%40Vr8
|
||||
|
||||
RESEND_API_KEY=replace-me
|
||||
OWNER_EMAIL=replace-me
|
||||
@@ -105,6 +115,29 @@ Or skip the confirmation prompt:
|
||||
powershell -ExecutionPolicy Bypass -File .\deploy.ps1 -Force
|
||||
```
|
||||
|
||||
To rebuild and restart only one service, for example the mail API:
|
||||
|
||||
```powershell
|
||||
powershell -ExecutionPolicy Bypass -File .\deploy.ps1 -Force -Service mail-api
|
||||
```
|
||||
|
||||
## Homepage content sync
|
||||
|
||||
Local development can feel fresher than production because production reads the
|
||||
homepage/shared content from PostgreSQL whenever `DATABASE_URL` is set.
|
||||
|
||||
The deployment flow now handles that automatically:
|
||||
|
||||
1. `deploy.ps1` exports the current `src/lib/content/homepage.ts` into
|
||||
`deploy-data/homepage-content.json`.
|
||||
2. The deploy archive uploads that JSON payload with the app source.
|
||||
3. After the Goodwalk stack is updated, the remote helper runs a content sync
|
||||
inside the app container.
|
||||
4. That sync upserts the `homepage` row in `site_content`.
|
||||
|
||||
This means future deploys will carry your latest file-based homepage/navigation/
|
||||
shared content changes into production PostgreSQL automatically.
|
||||
|
||||
## Cutover nginx
|
||||
|
||||
After the new Svelte stack is up and healthy, update the shared nginx config on
|
||||
@@ -122,6 +155,11 @@ Use the repo example as the new target config:
|
||||
nginx/goodwalk.co.nz.svelte.conf.example
|
||||
```
|
||||
|
||||
Important:
|
||||
- The normal `deploy.ps1` flow does not deploy or reload the shared nginx stack.
|
||||
- Copy the updated nginx config to `/docker/nginx/conf.d/goodwalk.co.nz.conf` and reload nginx once.
|
||||
- The repo example now uses Docker's internal resolver so future app/mail container rebuilds will not leave nginx pinned to stale upstream IPs.
|
||||
|
||||
Then reload nginx:
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user