You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: drop PayloadCMS legacy traces and consolidate DB SSL handling
- Delete one-shot `scripts/migrate-payload-to-prisma.ts` and the
SSL-wrapping `run-prisma-migrate-*.mjs` runners; `db:migrate` and
`db:migrate:deploy` now invoke `prisma migrate` directly.
- Introduce `src/utils/database-url.ts#withDatabaseSslParams` that
auto-appends `sslmode=require&uselibpqcompat=true` for
`*.rds.amazonaws.com` hosts, and use it from both `src/utils/prisma.ts`
and `prisma.config.ts` to keep runtime and migrations aligned.
- Remove `PAYLOAD_*` env vars (`PAYLOAD_DATABASE_URL`,
`PAYLOAD_DATABASE_SSL_REJECT_UNAUTHORIZED`, `PAYLOAD_S3_BASE_URL`,
`PAYLOAD_S3_SOURCE_BUCKET`) and rename
`PAYLOAD_S3_TARGET_BUCKET` -> `S3_BUCKET` across source, Dockerfile,
GitHub Actions CD secrets, and `.env` / `.env.example`.
- Drop direct `pg` / `@types/pg` deps (still installed transitively via
`@prisma/adapter-pg`).
- Scrub remaining Payload references from `README.md`, `AGENTS.md`, and
`src/app/AGENTS.md`; drop the obsolete `DATABASE_SSL_REJECT_UNAUTHORIZED`
override note.
- Apply `prettier:write` across the repo (admin dashboard/actions, info
pages, footer, scrolling logos, cms util, CI workflow).
pnpm db:migrate:deploy # Production migration deploy
67
-
pnpm migrate:payload # Dry-run old Payload RDS row counts
68
-
pnpm migrate:payload -- --write # Copy old Payload rows into Prisma tables
69
64
```
70
65
71
66
## NOTES
72
67
73
68
- No test suite exists. CI runs build + lint.
74
69
- Docker prod port is 1000.
75
70
- Existing S3 object URLs are preserved as CMS asset URLs; remote host is `stdev-kr.s3.ap-northeast-2.amazonaws.com`.
76
-
-`BETTER_AUTH_SECRET`, `BETTER_AUTH_URL`, `GOOGLE_CLIENT_ID`, `GOOGLE_CLIENT_SECRET`, and `DATABASE_URL` are required for the CMS/auth stack. Set `DATABASE_SSL_REJECT_UNAUTHORIZED=false` only when your managed Postgres requires unverified/self-signed TLS.
71
+
-`BETTER_AUTH_SECRET`, `BETTER_AUTH_URL`, `GOOGLE_CLIENT_ID`, `GOOGLE_CLIENT_SECRET`, and `DATABASE_URL` are required for the CMS/auth stack.
Payload CMS has been replaced by the Prisma-backed DIY CMS at `/admin`. Admin access requires a Google-connected account whose email ends with `@stdev.kr`.
76
-
77
-
```bash
78
-
pnpm db:generate
79
-
pnpm db:migrate
80
-
pnpm migrate:payload # dry-run: prints detected Payload rows
81
-
pnpm migrate:payload -- --write
82
-
pnpm migrate:payload -- --write --copy-s3
83
-
```
84
-
85
-
Set `PAYLOAD_DATABASE_URL` when the old Payload RDS database is separate from the new `DATABASE_URL`. The migration keeps existing S3 object URLs from the old RDS rows, or reconstructs them from `PAYLOAD_S3_BASE_URL`, `prefix`, and `filename` when Payload stored only upload metadata. Add `--copy-s3` to copy objects from `PAYLOAD_S3_SOURCE_BUCKET` to `PAYLOAD_S3_TARGET_BUCKET` with the configured `AWS_REGION`, `AWS_ACCESS_KEY`, and `AWS_SECRET_KEY` instead of only reusing existing URLs.
86
-
87
-
If your managed Postgres uses self-signed or unverified TLS, set `DATABASE_SSL_REJECT_UNAUTHORIZED=false` and `PAYLOAD_DATABASE_SSL_REJECT_UNAUTHORIZED=false`. Otherwise leave them unset to keep certificate verification enabled.
0 commit comments