2023-10-14 09:27:32 +00:00
|
|
|
|
import { webpackBundler } from "@payloadcms/bundler-webpack";
|
|
|
|
|
import { mongooseAdapter } from "@payloadcms/db-mongodb";
|
2024-04-04 19:42:48 +00:00
|
|
|
|
import { cloudStorage } from "@payloadcms/plugin-cloud-storage";
|
2023-07-14 11:03:01 +00:00
|
|
|
|
import path from "path";
|
2023-08-11 21:11:10 +00:00
|
|
|
|
import { buildConfig } from "payload/config";
|
2024-03-20 12:31:24 +00:00
|
|
|
|
import { ChronologyEvents } from "./collections/ChronologyEvents/ChronologyEvents";
|
2024-03-03 17:18:42 +00:00
|
|
|
|
import { Collectibles } from "./collections/Collectibles/Collectibles";
|
2023-08-11 21:11:10 +00:00
|
|
|
|
import { Currencies } from "./collections/Currencies/Currencies";
|
2024-01-20 02:25:52 +00:00
|
|
|
|
import { Folders } from "./collections/Folders/Folders";
|
2024-03-03 17:18:42 +00:00
|
|
|
|
import { GenericContents } from "./collections/GenericContents/GenericContents";
|
2024-03-13 04:32:02 +00:00
|
|
|
|
import { HomeFolders } from "./collections/HomeFolders/HomeFolders";
|
2024-02-29 23:26:06 +00:00
|
|
|
|
import { Images } from "./collections/Images/Images";
|
2023-08-11 21:11:10 +00:00
|
|
|
|
import { Languages } from "./collections/Languages/Languages";
|
2023-10-23 20:39:17 +00:00
|
|
|
|
import { Notes } from "./collections/Notes/Notes";
|
2024-02-29 23:26:06 +00:00
|
|
|
|
import { Pages } from "./collections/Pages/Pages";
|
2023-08-11 21:11:10 +00:00
|
|
|
|
import { Recorders } from "./collections/Recorders/Recorders";
|
2024-02-29 23:26:06 +00:00
|
|
|
|
import { Tags } from "./collections/Tags/Tags";
|
|
|
|
|
import { TagsGroups } from "./collections/TagsGroups/TagsGroups";
|
2024-04-04 19:42:48 +00:00
|
|
|
|
import { Videos } from "./collections/Videos/Videos";
|
2024-04-05 05:41:42 +00:00
|
|
|
|
import { VideosChannels } from "./collections/VideosChannels/VideosChannels";
|
|
|
|
|
import { VideosSubtitles } from "./collections/VideosSubtitles/VideosSubtitles";
|
2024-03-02 19:38:38 +00:00
|
|
|
|
import { Wordings } from "./collections/Wordings/Wordings";
|
2023-07-22 18:32:18 +00:00
|
|
|
|
import { Icon } from "./components/Icon";
|
2023-08-11 21:11:10 +00:00
|
|
|
|
import { Logo } from "./components/Logo";
|
|
|
|
|
import { Collections } from "./constants";
|
2024-04-04 19:42:48 +00:00
|
|
|
|
import { ftpAdapter } from "./plugins/ftpAdapter";
|
2023-10-23 20:39:17 +00:00
|
|
|
|
import { createEditor } from "./utils/editor";
|
2023-07-14 11:03:01 +00:00
|
|
|
|
|
|
|
|
|
export default buildConfig({
|
2023-08-11 21:11:10 +00:00
|
|
|
|
serverURL: process.env.PAYLOAD_URI,
|
2023-07-14 11:03:01 +00:00
|
|
|
|
admin: {
|
2023-08-11 21:11:10 +00:00
|
|
|
|
user: Collections.Recorders,
|
2023-07-22 18:32:18 +00:00
|
|
|
|
components: { graphics: { Logo, Icon } },
|
|
|
|
|
meta: {
|
|
|
|
|
favicon: "/public/favicon.ico",
|
|
|
|
|
ogImage: "og.jpg",
|
|
|
|
|
titleSuffix: "- Accord’s Library",
|
2023-07-22 18:32:48 +00:00
|
|
|
|
},
|
2023-07-22 18:32:18 +00:00
|
|
|
|
css: path.resolve(__dirname, "styles.scss"),
|
2023-10-14 09:27:32 +00:00
|
|
|
|
bundler: webpackBundler(),
|
2023-07-14 11:03:01 +00:00
|
|
|
|
},
|
2023-10-23 20:39:17 +00:00
|
|
|
|
editor: createEditor({}),
|
2023-07-22 18:32:48 +00:00
|
|
|
|
collections: [
|
2024-02-29 23:26:06 +00:00
|
|
|
|
Pages,
|
2024-03-13 04:32:02 +00:00
|
|
|
|
Collectibles,
|
|
|
|
|
Folders,
|
2024-03-20 12:31:24 +00:00
|
|
|
|
ChronologyEvents,
|
2023-10-23 20:39:17 +00:00
|
|
|
|
Notes,
|
2024-03-20 12:31:24 +00:00
|
|
|
|
|
2024-03-13 04:32:02 +00:00
|
|
|
|
Images,
|
2024-04-04 19:42:48 +00:00
|
|
|
|
Videos,
|
2024-04-05 05:41:42 +00:00
|
|
|
|
VideosSubtitles,
|
|
|
|
|
VideosChannels,
|
2024-03-20 12:31:24 +00:00
|
|
|
|
|
2024-02-29 23:26:06 +00:00
|
|
|
|
Tags,
|
|
|
|
|
TagsGroups,
|
2024-03-13 04:32:02 +00:00
|
|
|
|
Recorders,
|
|
|
|
|
Languages,
|
|
|
|
|
Currencies,
|
2024-03-03 17:18:42 +00:00
|
|
|
|
Wordings,
|
|
|
|
|
GenericContents,
|
2023-07-22 18:32:48 +00:00
|
|
|
|
],
|
2023-10-14 09:27:32 +00:00
|
|
|
|
db: mongooseAdapter({
|
2024-04-05 05:41:42 +00:00
|
|
|
|
url: process.env.MONGODB_URI ?? "",
|
2023-10-14 09:27:32 +00:00
|
|
|
|
}),
|
2024-03-13 04:32:02 +00:00
|
|
|
|
globals: [HomeFolders],
|
2023-07-14 11:03:01 +00:00
|
|
|
|
telemetry: false,
|
|
|
|
|
typescript: {
|
|
|
|
|
outputFile: path.resolve(__dirname, "types/collections.ts"),
|
|
|
|
|
},
|
|
|
|
|
graphQL: {
|
2023-07-22 18:32:48 +00:00
|
|
|
|
disable: true,
|
2023-07-14 11:03:01 +00:00
|
|
|
|
},
|
2024-04-04 19:42:48 +00:00
|
|
|
|
plugins: [
|
|
|
|
|
cloudStorage({
|
|
|
|
|
collections: {
|
|
|
|
|
[Collections.Videos]: {
|
|
|
|
|
adapter: ftpAdapter({
|
2024-04-05 05:41:42 +00:00
|
|
|
|
host: process.env.FTP_HOST ?? "",
|
|
|
|
|
user: process.env.FTP_USER ?? "",
|
|
|
|
|
password: process.env.FTP_PASSWORD ?? "",
|
2024-04-04 19:42:48 +00:00
|
|
|
|
secure: false,
|
2024-04-05 05:41:42 +00:00
|
|
|
|
endpoint: process.env.FTP_BASE_URL ?? "",
|
2024-04-04 19:42:48 +00:00
|
|
|
|
}),
|
|
|
|
|
disableLocalStorage: true,
|
|
|
|
|
disablePayloadAccessControl: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
}),
|
|
|
|
|
],
|
2023-07-14 11:03:01 +00:00
|
|
|
|
});
|