Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 3m43s
Build & Deploy / 🏗️ Build (push) Failing after 37s
Build & Deploy / 🧪 QA (push) Failing after 3m40s
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🩺 Health Check (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 2s
37 lines
1022 B
TypeScript
37 lines
1022 B
TypeScript
import { buildConfig } from "payload";
|
|
import { postgresAdapter } from "@payloadcms/db-postgres";
|
|
import { lexicalEditor } from "@payloadcms/richtext-lexical";
|
|
import path from "path";
|
|
import { fileURLToPath } from "url";
|
|
import sharp from "sharp";
|
|
|
|
import { Users } from "./src/payload/collections/Users";
|
|
import { Media } from "./src/payload/collections/Media";
|
|
import { Posts } from "./src/payload/collections/Posts";
|
|
|
|
const filename = fileURLToPath(import.meta.url);
|
|
const dirname = path.dirname(filename);
|
|
|
|
export default buildConfig({
|
|
admin: {
|
|
user: Users.slug,
|
|
importMap: {
|
|
baseDir: path.resolve(dirname),
|
|
},
|
|
},
|
|
collections: [Users, Media, Posts],
|
|
editor: lexicalEditor(),
|
|
secret: process.env.PAYLOAD_SECRET || "fallback-secret-for-dev",
|
|
typescript: {
|
|
outputFile: path.resolve(dirname, "payload-types.ts"),
|
|
},
|
|
db: postgresAdapter({
|
|
pool: {
|
|
connectionString:
|
|
process.env.DATABASE_URI || process.env.POSTGRES_URI || "",
|
|
},
|
|
}),
|
|
sharp,
|
|
plugins: [],
|
|
});
|