forked from ruymon/maua-map
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpayload.config.ts
75 lines (74 loc) · 1.95 KB
/
payload.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import { BlockCollection } from "@/collections/blocks";
import { EdgesCollection } from "@/collections/edges";
import { EventsCollection } from "@/collections/events";
import { LocationsCollection } from "@/collections/locations";
import { MediaCollection } from "@/collections/media";
import { NodesCollection } from "@/collections/nodes";
import { UsersCollection } from "@/collections/users";
import { IS_IN_DEVELOPMENT } from "@/constants/workspace";
import { postgresAdapter } from "@payloadcms/db-postgres";
import { vercelPostgresAdapter } from "@payloadcms/db-vercel-postgres";
import { lexicalEditor } from "@payloadcms/richtext-lexical";
import { uploadthingStorage } from "@payloadcms/storage-uploadthing";
import { buildConfig } from "payload";
import { pt } from "payload/i18n/pt";
import sharp from "sharp";
export default buildConfig({
editor: lexicalEditor(),
collections: [
MediaCollection,
EventsCollection,
UsersCollection,
LocationsCollection,
BlockCollection,
NodesCollection,
EdgesCollection,
],
plugins: [
uploadthingStorage({
collections: {
media: true,
},
options: {
token: process.env.UPLOADTHING_SECRET,
acl: "public-read",
},
}),
],
secret: process.env.PAYLOAD_SECRET || "",
db: IS_IN_DEVELOPMENT
? postgresAdapter({
pool: {
connectionString: process.env.DATABASE_URL,
},
idType: "uuid",
})
: vercelPostgresAdapter({
idType: "uuid",
}),
i18n: {
supportedLanguages: {
pt,
},
},
admin: {
user: "users",
// Add your own logo and icon here
components: {
graphics: {
Icon: {
path: "/src/graphics/icon#Icon",
},
Logo: {
path: "/src/graphics/logo#Logo",
},
},
},
meta: {
// favicon: '/assets/favicon.svg',
// ogImage: '/assets/ogImage.png',
titleSuffix: "- Mauá Map",
},
},
sharp,
});