qazaq-legacy-foundation-web/src/payload.config.ts
Peppa fd1a3db6fe
All checks were successful
peppa/lint lint: success за 1с
peppa/typecheck typecheck: success за 2с
peppa/test test: success за 1с
peppa/build build: success за 44с
ci / checks (pull_request) Successful in 1m18s
deploy / deploy (pull_request) Successful in 1m59s
QLFW-55: учредитель, директор и попечительский совет на странице «О фонде»
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-17 18:46:07 +05:00

30 lines
1.2 KiB
TypeScript

import path from 'node:path'
import { fileURLToPath } from 'node:url'
import { buildConfig } from 'payload'
import { sqliteAdapter } from '@payloadcms/db-sqlite'
import { lexicalEditor } from '@payloadcms/richtext-lexical'
import { Users } from './collections/Users'
import { Inquiries } from './collections/Inquiries'
import { News } from './collections/News'
import { Home } from './globals/Home'
import { Legal } from './globals/Legal'
import { Foundation } from './globals/Foundation'
import { migrations } from './migrations'
const dirname = path.dirname(fileURLToPath(import.meta.url))
export default buildConfig({
admin: { user: Users.slug },
collections: [Users, News, Inquiries],
globals: [Home, Legal, Foundation],
editor: lexicalEditor(),
// mock-секрет только для запуска без настроек; на стенде задаётся PAYLOAD_SECRET.
secret: process.env.PAYLOAD_SECRET || 'mock-insecure-secret-replace-me',
localization: { locales: ['ru', 'kk', 'en'], defaultLocale: 'ru', fallback: true },
db: sqliteAdapter({
client: { url: process.env.DATABASE_URI || 'file:./data/payload.db' },
prodMigrations: migrations,
}),
typescript: { outputFile: path.resolve(dirname, 'payload-types.ts') },
})