mirror of
https://github.com/Nezumi-2711/strapi-cloud-template-blog-acf3cc33ae.git
synced 2026-09-22 13:48:37 +00:00
integrate with supabase
This commit is contained in:
@@ -5,3 +5,17 @@ API_TOKEN_SALT=tobemodified
|
|||||||
ADMIN_JWT_SECRET=tobemodified
|
ADMIN_JWT_SECRET=tobemodified
|
||||||
TRANSFER_TOKEN_SALT=tobemodified
|
TRANSFER_TOKEN_SALT=tobemodified
|
||||||
JWT_SECRET=tobemodified
|
JWT_SECRET=tobemodified
|
||||||
|
|
||||||
|
# Supabase Provider
|
||||||
|
SUPABASE_URL=to_be_modified
|
||||||
|
SUPABASE_API_URL=to_be_modified
|
||||||
|
SUPABASE_API_KEY=to_be_modified
|
||||||
|
SUPABASE_BUCKET=to_be_modified
|
||||||
|
SUPABASE_DIRECTORY=to_be_modified
|
||||||
|
|
||||||
|
# Supabase Database
|
||||||
|
DATABASE_CLIENT=postgres
|
||||||
|
DATABASE_URL=to_be_modified
|
||||||
|
DATABASE_SHEMA=public
|
||||||
|
DATABASE_POOL_MIN=1
|
||||||
|
DATABASE_POOL_MAX=100
|
||||||
|
|||||||
+36
-11
@@ -1,12 +1,37 @@
|
|||||||
module.exports = [
|
module.exports = ({ env }) => [
|
||||||
'strapi::logger',
|
"strapi::errors",
|
||||||
'strapi::errors',
|
{
|
||||||
'strapi::security',
|
name: "strapi::security",
|
||||||
'strapi::cors',
|
config: {
|
||||||
'strapi::poweredBy',
|
contentSecurityPolicy: {
|
||||||
'strapi::query',
|
useDefaults: true,
|
||||||
'strapi::body',
|
directives: {
|
||||||
'strapi::session',
|
"connect-src": ["'self'", "https:"],
|
||||||
'strapi::favicon',
|
"default-src": ["'self'"],
|
||||||
'strapi::public',
|
"img-src": [
|
||||||
|
"'self'",
|
||||||
|
"data:",
|
||||||
|
"blob:",
|
||||||
|
"market-assets.strapi.io",
|
||||||
|
env("SUPABASE_URL"),
|
||||||
|
],
|
||||||
|
"media-src": [
|
||||||
|
"'self'",
|
||||||
|
"data:",
|
||||||
|
"blob:",
|
||||||
|
"market-assets.strapi.io",
|
||||||
|
env("SUPABASE_URL"),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"strapi::cors",
|
||||||
|
"strapi::poweredBy",
|
||||||
|
"strapi::logger",
|
||||||
|
"strapi::query",
|
||||||
|
"strapi::body",
|
||||||
|
"strapi::session",
|
||||||
|
"strapi::favicon",
|
||||||
|
"strapi::public",
|
||||||
];
|
];
|
||||||
+20
-2
@@ -6,8 +6,26 @@ module.exports = ({ env }) => ({
|
|||||||
apiKey: env('RESEND_API_KEY'), // Required
|
apiKey: env('RESEND_API_KEY'), // Required
|
||||||
},
|
},
|
||||||
settings: {
|
settings: {
|
||||||
defaultFrom: 'me@example.com',
|
defaultFrom: env('RESEND_DEFAULT_FROM'),
|
||||||
defaultReplyTo: 'me@example.com',
|
defaultReplyTo: env('RESEND_DEFAULT_REPLY_TO'),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
upload: {
|
||||||
|
config: {
|
||||||
|
provider: "strapi-provider-upload-supabase",
|
||||||
|
providerOptions: {
|
||||||
|
apiUrl: env("SUPABASE_API_URL"),
|
||||||
|
apiKey: env("SUPABASE_API_KEY"),
|
||||||
|
bucket: env("SUPABASE_BUCKET"),
|
||||||
|
directory: env("SUPABASE_DIRECTORY"),
|
||||||
|
options: {},
|
||||||
|
},
|
||||||
|
actionOptions: {
|
||||||
|
upload: {},
|
||||||
|
uploadStream: {},
|
||||||
|
delete: {},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Generated
+997
-1203
File diff suppressed because it is too large
Load Diff
+6
-4
@@ -12,9 +12,9 @@
|
|||||||
"strapi": "strapi"
|
"strapi": "strapi"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@strapi/plugin-cloud": "5.15.0",
|
"@strapi/plugin-cloud": "5.23.6",
|
||||||
"@strapi/plugin-users-permissions": "5.15.0",
|
"@strapi/plugin-users-permissions": "5.23.6",
|
||||||
"@strapi/strapi": "5.15.0",
|
"@strapi/strapi": "5.23.6",
|
||||||
"better-sqlite3": "11.3.0",
|
"better-sqlite3": "11.3.0",
|
||||||
"fs-extra": "^10.0.0",
|
"fs-extra": "^10.0.0",
|
||||||
"mime-types": "^2.1.27",
|
"mime-types": "^2.1.27",
|
||||||
@@ -22,7 +22,9 @@
|
|||||||
"react-dom": "^18.0.0",
|
"react-dom": "^18.0.0",
|
||||||
"react-router-dom": "^6.0.0",
|
"react-router-dom": "^6.0.0",
|
||||||
"strapi-provider-email-resend": "^1.0.4",
|
"strapi-provider-email-resend": "^1.0.4",
|
||||||
"styled-components": "^6.0.0"
|
"styled-components": "^6.0.0",
|
||||||
|
"pg": "^8.16.3",
|
||||||
|
"strapi-provider-upload-supabase": "^1.0.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.0.0 <=22.x.x",
|
"node": ">=18.0.0 <=22.x.x",
|
||||||
|
|||||||
Vendored
+56
-56
@@ -1,55 +1,4 @@
|
|||||||
import type { Struct, Schema } from '@strapi/strapi';
|
import type { Schema, Struct } from '@strapi/strapi';
|
||||||
|
|
||||||
export interface SharedSlider extends Struct.ComponentSchema {
|
|
||||||
collectionName: 'components_shared_sliders';
|
|
||||||
info: {
|
|
||||||
displayName: 'Slider';
|
|
||||||
icon: 'address-book';
|
|
||||||
description: '';
|
|
||||||
};
|
|
||||||
attributes: {
|
|
||||||
files: Schema.Attribute.Media<'images', true>;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface SharedSeo extends Struct.ComponentSchema {
|
|
||||||
collectionName: 'components_shared_seos';
|
|
||||||
info: {
|
|
||||||
name: 'Seo';
|
|
||||||
icon: 'allergies';
|
|
||||||
displayName: 'Seo';
|
|
||||||
description: '';
|
|
||||||
};
|
|
||||||
attributes: {
|
|
||||||
metaTitle: Schema.Attribute.String & Schema.Attribute.Required;
|
|
||||||
metaDescription: Schema.Attribute.Text & Schema.Attribute.Required;
|
|
||||||
shareImage: Schema.Attribute.Media<'images'>;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface SharedRichText extends Struct.ComponentSchema {
|
|
||||||
collectionName: 'components_shared_rich_texts';
|
|
||||||
info: {
|
|
||||||
displayName: 'Rich text';
|
|
||||||
icon: 'align-justify';
|
|
||||||
description: '';
|
|
||||||
};
|
|
||||||
attributes: {
|
|
||||||
body: Schema.Attribute.RichText;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface SharedQuote extends Struct.ComponentSchema {
|
|
||||||
collectionName: 'components_shared_quotes';
|
|
||||||
info: {
|
|
||||||
displayName: 'Quote';
|
|
||||||
icon: 'indent';
|
|
||||||
};
|
|
||||||
attributes: {
|
|
||||||
title: Schema.Attribute.String;
|
|
||||||
body: Schema.Attribute.Text;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface SharedMedia extends Struct.ComponentSchema {
|
export interface SharedMedia extends Struct.ComponentSchema {
|
||||||
collectionName: 'components_shared_media';
|
collectionName: 'components_shared_media';
|
||||||
@@ -62,14 +11,65 @@ export interface SharedMedia extends Struct.ComponentSchema {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface SharedQuote extends Struct.ComponentSchema {
|
||||||
|
collectionName: 'components_shared_quotes';
|
||||||
|
info: {
|
||||||
|
displayName: 'Quote';
|
||||||
|
icon: 'indent';
|
||||||
|
};
|
||||||
|
attributes: {
|
||||||
|
body: Schema.Attribute.Text;
|
||||||
|
title: Schema.Attribute.String;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface SharedRichText extends Struct.ComponentSchema {
|
||||||
|
collectionName: 'components_shared_rich_texts';
|
||||||
|
info: {
|
||||||
|
description: '';
|
||||||
|
displayName: 'Rich text';
|
||||||
|
icon: 'align-justify';
|
||||||
|
};
|
||||||
|
attributes: {
|
||||||
|
body: Schema.Attribute.RichText;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface SharedSeo extends Struct.ComponentSchema {
|
||||||
|
collectionName: 'components_shared_seos';
|
||||||
|
info: {
|
||||||
|
description: '';
|
||||||
|
displayName: 'Seo';
|
||||||
|
icon: 'allergies';
|
||||||
|
name: 'Seo';
|
||||||
|
};
|
||||||
|
attributes: {
|
||||||
|
metaDescription: Schema.Attribute.Text & Schema.Attribute.Required;
|
||||||
|
metaTitle: Schema.Attribute.String & Schema.Attribute.Required;
|
||||||
|
shareImage: Schema.Attribute.Media<'images'>;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface SharedSlider extends Struct.ComponentSchema {
|
||||||
|
collectionName: 'components_shared_sliders';
|
||||||
|
info: {
|
||||||
|
description: '';
|
||||||
|
displayName: 'Slider';
|
||||||
|
icon: 'address-book';
|
||||||
|
};
|
||||||
|
attributes: {
|
||||||
|
files: Schema.Attribute.Media<'images', true>;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
declare module '@strapi/strapi' {
|
declare module '@strapi/strapi' {
|
||||||
export module Public {
|
export module Public {
|
||||||
export interface ComponentSchemas {
|
export interface ComponentSchemas {
|
||||||
'shared.slider': SharedSlider;
|
|
||||||
'shared.seo': SharedSeo;
|
|
||||||
'shared.rich-text': SharedRichText;
|
|
||||||
'shared.quote': SharedQuote;
|
|
||||||
'shared.media': SharedMedia;
|
'shared.media': SharedMedia;
|
||||||
|
'shared.quote': SharedQuote;
|
||||||
|
'shared.rich-text': SharedRichText;
|
||||||
|
'shared.seo': SharedSeo;
|
||||||
|
'shared.slider': SharedSlider;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+871
-835
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user