Commit Graph

8 Commits

Author SHA1 Message Date
Loma Bot Ops 4a673ebb28 Support sub-path deploy via NEXT_PUBLIC_BASE_PATH (loma.chat/pagiva)
Adds basePath config, withBase/appUrl helpers, base-path-aware cookies,
OAuth redirects, manifest, service worker and cron runner.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 16:48:42 +07:00
chaloemphong 9d5a029fa5 Disable Facebook social login permanently
Facebook Login for Business (the only Login product a Business-type
app gets, needed here for Page/Messenger/Instagram) has no
email/public_profile permission to request, only business asset
permissions - there is no config_id that can resolve a user's
identity. credentials() now always returns null for facebook so the
button stays hidden; Google login is unaffected.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-11-22 16:17:36 +07:00
chaloemphong 025ed6cc57 Add Vercel deploy support alongside Coolify
Storage now picks Vercel Blob when a store is connected (BLOB_STORE_ID
or BLOB_READ_WRITE_TOKEN), falling back to local disk for self-hosted
runs. Adds vercel.json cron schedule for the existing cron routes
(ig-publisher capped to once/day on Hobby plan).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-11-22 15:16:08 +07:00
chaloemphong 32c121a85a Copy the full scripts/ directory into the runtime image
Only cron-runner.mjs was copied, so scripts/create-user.mjs (needed to
bootstrap the first login account on a fresh deploy) was missing from
the container entirely.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-11-22 14:45:43 +07:00
chaloemphong fd33d5c987 Copy prisma.config.ts into the runtime image
Prisma 7 reads datasource.url from prisma.config.ts, not schema.prisma.
The final Docker stage copied prisma/ but not the root config file, so
`prisma migrate deploy` always failed with "datasource.url property is
required" regardless of DATABASE_URL being set correctly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-11-22 14:29:57 +07:00
chaloemphong 53b8c3cbf7 Add docker-compose deploy path with Coolify-managed secrets
Adds docker-compose.yml so Coolify can provision Postgres and generate
DATABASE_URL/SESSION_SECRET/TOKEN_ENCRYPTION_KEY/CRON_SECRET itself via
its SERVICE_PASSWORD_* magic variables, instead of an operator typing
them into the dashboard by hand.

TOKEN_ENCRYPTION_KEY now derives its AES-256 key via SHA-256 instead of
requiring exactly 32 raw bytes in base64, so a generated magic variable
works regardless of its format.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-11-22 12:45:57 +07:00
chaloemphong 1cb75a163f Self-host Anuphan font instead of next/font/google
The Coolify build server has no outbound access to fonts.googleapis.com,
which crashed `npm run build` inside the Docker build with a next/font
google-loader TypeError. Switch to next/font/local with the variable TTF
fetched from the Google Fonts GitHub repo (same OFL-licensed font, no
build-time network dependency).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-11-22 12:31:13 +07:00
chaloemphong 9d32552457 Initial commit: page-manager Next.js app with Coolify deploy support
Replace Vercel-specific infra (Cron, Blob) with self-hosted equivalents
for deployment to Coolify: in-container cron scheduler
(scripts/cron-runner.mjs) and disk-based upload storage served via
/api/uploads/[...path]. Add Dockerfile, .dockerignore, and /api/health
for container health checks.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-11-22 11:52:17 +07:00