fix bugs
This commit is contained in:
parent
ebb586d08a
commit
14dfa8dc37
13 changed files with 20318 additions and 21836 deletions
|
|
@ -1,15 +0,0 @@
|
||||||
node_modules
|
|
||||||
npm-debug.log
|
|
||||||
.git
|
|
||||||
.gitignore
|
|
||||||
README.md
|
|
||||||
.env
|
|
||||||
.nyc_output
|
|
||||||
coverage
|
|
||||||
.sass-cache
|
|
||||||
.cache
|
|
||||||
.tmp
|
|
||||||
.DS_Store
|
|
||||||
*.log
|
|
||||||
dist
|
|
||||||
.strapi-updater.json
|
|
||||||
8
.env.example
Normal file
8
.env.example
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
HOST=0.0.0.0
|
||||||
|
PORT=1337
|
||||||
|
APP_KEYS="toBeModified1,toBeModified2"
|
||||||
|
API_TOKEN_SALT=tobemodified
|
||||||
|
ADMIN_JWT_SECRET=tobemodified
|
||||||
|
TRANSFER_TOKEN_SALT=tobemodified
|
||||||
|
JWT_SECRET=tobemodified
|
||||||
|
ENCRYPTION_KEY=tobemodified
|
||||||
|
|
@ -1,28 +1,25 @@
|
||||||
import type { Core } from "@strapi/strapi";
|
import type { Core } from '@strapi/strapi';
|
||||||
|
|
||||||
const config = ({
|
const config = ({ env }: Core.Config.Shared.ConfigParams): Core.Config.Admin => ({
|
||||||
env,
|
auth: {
|
||||||
}: Core.Config.Shared.ConfigParams): Core.Config.Admin => {
|
secret: env('ADMIN_JWT_SECRET'),
|
||||||
return {
|
},
|
||||||
auth: {
|
apiToken: {
|
||||||
secret: env("ADMIN_JWT_SECRET"),
|
salt: env('API_TOKEN_SALT'),
|
||||||
|
},
|
||||||
|
transfer: {
|
||||||
|
token: {
|
||||||
|
salt: env('TRANSFER_TOKEN_SALT'),
|
||||||
},
|
},
|
||||||
apiToken: {
|
},
|
||||||
salt: env("API_TOKEN_SALT"),
|
secrets: {
|
||||||
},
|
encryptionKey: env('ENCRYPTION_KEY'),
|
||||||
transfer: {
|
},
|
||||||
token: {
|
flags: {
|
||||||
salt: env("TRANSFER_TOKEN_SALT"),
|
nps: env.bool('FLAG_NPS', true),
|
||||||
},
|
promoteEE: env.bool('FLAG_PROMOTE_EE', true),
|
||||||
},
|
docLinks: env.bool('FLAG_DOC_LINKS', true),
|
||||||
secrets: {
|
},
|
||||||
encryptionKey: env("ENCRYPTION_KEY"),
|
});
|
||||||
},
|
|
||||||
flags: {
|
|
||||||
nps: env.bool("FLAG_NPS", true),
|
|
||||||
promoteEE: env.bool("FLAG_PROMOTE_EE", true),
|
|
||||||
},
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
export default config;
|
export default config;
|
||||||
|
|
|
||||||
|
|
@ -1,62 +1,62 @@
|
||||||
services:
|
services:
|
||||||
nicwands:
|
strapi:
|
||||||
container_name: nicwands
|
container_name: strapi
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
image: nicwands-cms:latest
|
image: strapi-cms:latest
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
env_file: .env
|
env_file: .env
|
||||||
environment:
|
environment:
|
||||||
DATABASE_CLIENT: ${DATABASE_CLIENT}
|
DATABASE_CLIENT: ${DATABASE_CLIENT}
|
||||||
DATABASE_HOST: nicwandsDB
|
DATABASE_HOST: strapiDB
|
||||||
DATABASE_NAME: ${DATABASE_NAME}
|
DATABASE_NAME: ${DATABASE_NAME}
|
||||||
DATABASE_USERNAME: ${DATABASE_USERNAME}
|
DATABASE_USERNAME: ${DATABASE_USERNAME}
|
||||||
DATABASE_PORT: ${DATABASE_PORT}
|
DATABASE_PORT: ${DATABASE_PORT}
|
||||||
JWT_SECRET: ${JWT_SECRET}
|
JWT_SECRET: ${JWT_SECRET}
|
||||||
ADMIN_JWT_SECRET: ${ADMIN_JWT_SECRET}
|
ADMIN_JWT_SECRET: ${ADMIN_JWT_SECRET}
|
||||||
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
|
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
|
||||||
NODE_ENV: ${NODE_ENV}
|
NODE_ENV: ${NODE_ENV}
|
||||||
volumes:
|
volumes:
|
||||||
- ./.env:/opt/app/.env
|
- ./.env:/opt/app/.env
|
||||||
- ./public/uploads:/opt/app/public/uploads
|
- ./public/uploads:/opt/app/public/uploads
|
||||||
depends_on:
|
depends_on:
|
||||||
- nicwandsDB
|
- strapiDB
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test:
|
test:
|
||||||
- CMD
|
- CMD
|
||||||
- node
|
- node
|
||||||
- "-e"
|
- '-e'
|
||||||
- "fetch('http://127.0.0.1:1337/admin').then((r) => {if (r.status !== 200) throw new Error(r.status)})"
|
- "fetch('http://127.0.0.1:1337/admin').then((r) => {if (r.status !== 200) throw new Error(r.status)})"
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
interval: 5s
|
interval: 5s
|
||||||
retries: 3
|
retries: 3
|
||||||
|
|
||||||
nicwandsDB:
|
strapiDB:
|
||||||
container_name: nicwandsDB
|
container_name: strapiDB
|
||||||
platform: linux/amd64
|
platform: linux/amd64
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
env_file: .env
|
env_file: .env
|
||||||
image: postgres:14.5-alpine
|
image: postgres:14.5-alpine
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_USER: ${DATABASE_USERNAME}
|
POSTGRES_USER: ${DATABASE_USERNAME}
|
||||||
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
|
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
|
||||||
POSTGRES_DB: ${DATABASE_NAME}
|
POSTGRES_DB: ${DATABASE_NAME}
|
||||||
volumes:
|
volumes:
|
||||||
- nicwands-data:/var/lib/postgresql/data/
|
- strapi-data:/var/lib/postgresql/data/
|
||||||
|
|
||||||
nicwandsAdminer:
|
strapiAdminer:
|
||||||
container_name: nicwandsAdminer
|
container_name: strapiAdminer
|
||||||
image: adminer
|
image: adminer
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
- ADMINER_DEFAULT_SERVER=nicwandsDB
|
- ADMINER_DEFAULT_SERVER=strapiDB
|
||||||
depends_on:
|
depends_on:
|
||||||
- nicwandsDB
|
- strapiDB
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
nicwands-data:
|
strapi-data:
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
nicwands:
|
strapi:
|
||||||
name: nicwands
|
name: strapi
|
||||||
driver: bridge
|
driver: bridge
|
||||||
|
|
|
||||||
41844
package-lock.json
generated
41844
package-lock.json
generated
File diff suppressed because it is too large
Load diff
80
package.json
80
package.json
|
|
@ -1,42 +1,42 @@
|
||||||
{
|
{
|
||||||
"name": "cms.nicwands.com",
|
"name": "cms-nicwands-com",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "A Strapi application",
|
"description": "A Strapi application",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "strapi build",
|
"build": "strapi build",
|
||||||
"console": "strapi console",
|
"console": "strapi console",
|
||||||
"deploy": "strapi deploy",
|
"deploy": "strapi deploy",
|
||||||
"dev": "strapi develop",
|
"dev": "strapi develop",
|
||||||
"develop": "strapi develop",
|
"develop": "strapi develop",
|
||||||
"start": "strapi start",
|
"start": "strapi start",
|
||||||
"strapi": "strapi",
|
"strapi": "strapi",
|
||||||
"upgrade": "npx @strapi/upgrade latest",
|
"upgrade": "npx @strapi/upgrade latest",
|
||||||
"upgrade:dry": "npx @strapi/upgrade latest --dry"
|
"upgrade:dry": "npx @strapi/upgrade latest --dry"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@strapi/plugin-cloud": "5.46.1",
|
"@strapi/plugin-cloud": "5.47.1",
|
||||||
"@strapi/plugin-users-permissions": "5.46.1",
|
"@strapi/plugin-users-permissions": "5.47.1",
|
||||||
"@strapi/strapi": "5.46.1",
|
"@strapi/strapi": "5.47.1",
|
||||||
"pg": "8.20.0",
|
"better-sqlite3": "^12.10.0",
|
||||||
"react": "^18.0.0",
|
"pg": "8.20.0",
|
||||||
"react-dom": "^18.0.0",
|
"react": "^18.0.0",
|
||||||
"react-router-dom": "^6.0.0",
|
"react-dom": "^18.0.0",
|
||||||
"styled-components": "^6.0.0"
|
"react-router-dom": "^6.0.0",
|
||||||
},
|
"styled-components": "^6.0.0"
|
||||||
"devDependencies": {
|
},
|
||||||
"@types/node": "^20",
|
"devDependencies": {
|
||||||
"@types/react": "^18",
|
"@types/node": "^20",
|
||||||
"@types/react-dom": "^18",
|
"@types/react": "^18",
|
||||||
"better-sqlite3": "^12.10.0",
|
"@types/react-dom": "^18",
|
||||||
"typescript": "^5"
|
"typescript": "^5"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=20.0.0 <=24.x.x",
|
"node": ">=20.0.0 <=24.x.x",
|
||||||
"npm": ">=6.0.0"
|
"npm": ">=6.0.0"
|
||||||
},
|
},
|
||||||
"strapi": {
|
"strapi": {
|
||||||
"uuid": "33974e7e-e7a6-4572-985a-e2ef467f2114",
|
"uuid": "226ed072-1db6-4f93-b888-095cae9f3e5c",
|
||||||
"installId": "d119f403157b783e98a16f85355418da5240a3859fbe1bb4683f7b3df6324fe5"
|
"installId": "3c81cee5923221a8cfb80780ef853fb60670f459af5e899344d83559ab34f268"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ export default {
|
||||||
// 'fr',
|
// 'fr',
|
||||||
// 'cs',
|
// 'cs',
|
||||||
// 'de',
|
// 'de',
|
||||||
// 'dk',
|
// 'da',
|
||||||
// 'es',
|
// 'es',
|
||||||
// 'he',
|
// 'he',
|
||||||
// 'id',
|
// 'id',
|
||||||
|
|
|
||||||
|
|
@ -11,10 +11,12 @@
|
||||||
},
|
},
|
||||||
"pluginOptions": {},
|
"pluginOptions": {},
|
||||||
"attributes": {
|
"attributes": {
|
||||||
"content": {
|
"mosaic_items": {
|
||||||
"type": "blocks"
|
"type": "component",
|
||||||
|
"component": "global.mosaic-item",
|
||||||
|
"repeatable": true
|
||||||
},
|
},
|
||||||
"SEO": {
|
"seo": {
|
||||||
"type": "component",
|
"type": "component",
|
||||||
"component": "global.seo",
|
"component": "global.seo",
|
||||||
"repeatable": false
|
"repeatable": false
|
||||||
|
|
|
||||||
21
src/components/global/mosaic-item.json
Normal file
21
src/components/global/mosaic-item.json
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"collectionName": "components_global_mosaic_items",
|
||||||
|
"info": {
|
||||||
|
"displayName": "Mosaic Item",
|
||||||
|
"icon": "apps"
|
||||||
|
},
|
||||||
|
"options": {},
|
||||||
|
"attributes": {
|
||||||
|
"image": {
|
||||||
|
"type": "media",
|
||||||
|
"multiple": false,
|
||||||
|
"allowedTypes": [
|
||||||
|
"images"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"note": {
|
||||||
|
"type": "blocks"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"config": {}
|
||||||
|
}
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
"collectionName": "components_global_seos",
|
"collectionName": "components_global_seos",
|
||||||
"info": {
|
"info": {
|
||||||
"displayName": "SEO",
|
"displayName": "SEO",
|
||||||
"icon": "stack"
|
"icon": "filter"
|
||||||
},
|
},
|
||||||
"options": {},
|
"options": {},
|
||||||
"attributes": {
|
"attributes": {
|
||||||
|
|
|
||||||
15
types/generated/components.d.ts
vendored
15
types/generated/components.d.ts
vendored
|
|
@ -1,10 +1,22 @@
|
||||||
import type { Schema, Struct } from '@strapi/strapi';
|
import type { Schema, Struct } from '@strapi/strapi';
|
||||||
|
|
||||||
|
export interface GlobalMosaicItem extends Struct.ComponentSchema {
|
||||||
|
collectionName: 'components_global_mosaic_items';
|
||||||
|
info: {
|
||||||
|
displayName: 'Mosaic Item';
|
||||||
|
icon: 'apps';
|
||||||
|
};
|
||||||
|
attributes: {
|
||||||
|
image: Schema.Attribute.Media<'images'>;
|
||||||
|
note: Schema.Attribute.Blocks;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
export interface GlobalSeo extends Struct.ComponentSchema {
|
export interface GlobalSeo extends Struct.ComponentSchema {
|
||||||
collectionName: 'components_global_seos';
|
collectionName: 'components_global_seos';
|
||||||
info: {
|
info: {
|
||||||
displayName: 'SEO';
|
displayName: 'SEO';
|
||||||
icon: 'stack';
|
icon: 'filter';
|
||||||
};
|
};
|
||||||
attributes: {
|
attributes: {
|
||||||
description: Schema.Attribute.Text;
|
description: Schema.Attribute.Text;
|
||||||
|
|
@ -16,6 +28,7 @@ export interface GlobalSeo extends Struct.ComponentSchema {
|
||||||
declare module '@strapi/strapi' {
|
declare module '@strapi/strapi' {
|
||||||
export module Public {
|
export module Public {
|
||||||
export interface ComponentSchemas {
|
export interface ComponentSchemas {
|
||||||
|
'global.mosaic-item': GlobalMosaicItem;
|
||||||
'global.seo': GlobalSeo;
|
'global.seo': GlobalSeo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
4
types/generated/contentTypes.d.ts
vendored
4
types/generated/contentTypes.d.ts
vendored
|
|
@ -451,7 +451,6 @@ export interface ApiGlobalGlobal extends Struct.SingleTypeSchema {
|
||||||
draftAndPublish: true;
|
draftAndPublish: true;
|
||||||
};
|
};
|
||||||
attributes: {
|
attributes: {
|
||||||
content: Schema.Attribute.Blocks;
|
|
||||||
createdAt: Schema.Attribute.DateTime;
|
createdAt: Schema.Attribute.DateTime;
|
||||||
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||||
Schema.Attribute.Private;
|
Schema.Attribute.Private;
|
||||||
|
|
@ -461,8 +460,9 @@ export interface ApiGlobalGlobal extends Struct.SingleTypeSchema {
|
||||||
'api::global.global'
|
'api::global.global'
|
||||||
> &
|
> &
|
||||||
Schema.Attribute.Private;
|
Schema.Attribute.Private;
|
||||||
|
mosaic_items: Schema.Attribute.Component<'global.mosaic-item', true>;
|
||||||
publishedAt: Schema.Attribute.DateTime;
|
publishedAt: Schema.Attribute.DateTime;
|
||||||
SEO: Schema.Attribute.Component<'global.seo', false>;
|
seo: Schema.Attribute.Component<'global.seo', false>;
|
||||||
updatedAt: Schema.Attribute.DateTime;
|
updatedAt: Schema.Attribute.DateTime;
|
||||||
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||||
Schema.Attribute.Private;
|
Schema.Attribute.Private;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue