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 = ({
|
||||
env,
|
||||
}: Core.Config.Shared.ConfigParams): Core.Config.Admin => {
|
||||
return {
|
||||
auth: {
|
||||
secret: env("ADMIN_JWT_SECRET"),
|
||||
const config = ({ env }: Core.Config.Shared.ConfigParams): Core.Config.Admin => ({
|
||||
auth: {
|
||||
secret: env('ADMIN_JWT_SECRET'),
|
||||
},
|
||||
apiToken: {
|
||||
salt: env('API_TOKEN_SALT'),
|
||||
},
|
||||
transfer: {
|
||||
token: {
|
||||
salt: env('TRANSFER_TOKEN_SALT'),
|
||||
},
|
||||
apiToken: {
|
||||
salt: env("API_TOKEN_SALT"),
|
||||
},
|
||||
transfer: {
|
||||
token: {
|
||||
salt: env("TRANSFER_TOKEN_SALT"),
|
||||
},
|
||||
},
|
||||
secrets: {
|
||||
encryptionKey: env("ENCRYPTION_KEY"),
|
||||
},
|
||||
flags: {
|
||||
nps: env.bool("FLAG_NPS", true),
|
||||
promoteEE: env.bool("FLAG_PROMOTE_EE", true),
|
||||
},
|
||||
};
|
||||
};
|
||||
},
|
||||
secrets: {
|
||||
encryptionKey: env('ENCRYPTION_KEY'),
|
||||
},
|
||||
flags: {
|
||||
nps: env.bool('FLAG_NPS', true),
|
||||
promoteEE: env.bool('FLAG_PROMOTE_EE', true),
|
||||
docLinks: env.bool('FLAG_DOC_LINKS', true),
|
||||
},
|
||||
});
|
||||
|
||||
export default config;
|
||||
|
|
|
|||
|
|
@ -1,62 +1,62 @@
|
|||
services:
|
||||
nicwands:
|
||||
container_name: nicwands
|
||||
build:
|
||||
context: .
|
||||
image: nicwands-cms:latest
|
||||
restart: unless-stopped
|
||||
env_file: .env
|
||||
environment:
|
||||
DATABASE_CLIENT: ${DATABASE_CLIENT}
|
||||
DATABASE_HOST: nicwandsDB
|
||||
DATABASE_NAME: ${DATABASE_NAME}
|
||||
DATABASE_USERNAME: ${DATABASE_USERNAME}
|
||||
DATABASE_PORT: ${DATABASE_PORT}
|
||||
JWT_SECRET: ${JWT_SECRET}
|
||||
ADMIN_JWT_SECRET: ${ADMIN_JWT_SECRET}
|
||||
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
|
||||
NODE_ENV: ${NODE_ENV}
|
||||
volumes:
|
||||
- ./.env:/opt/app/.env
|
||||
- ./public/uploads:/opt/app/public/uploads
|
||||
depends_on:
|
||||
- nicwandsDB
|
||||
healthcheck:
|
||||
test:
|
||||
- CMD
|
||||
- node
|
||||
- "-e"
|
||||
- "fetch('http://127.0.0.1:1337/admin').then((r) => {if (r.status !== 200) throw new Error(r.status)})"
|
||||
timeout: 5s
|
||||
interval: 5s
|
||||
retries: 3
|
||||
strapi:
|
||||
container_name: strapi
|
||||
build:
|
||||
context: .
|
||||
image: strapi-cms:latest
|
||||
restart: unless-stopped
|
||||
env_file: .env
|
||||
environment:
|
||||
DATABASE_CLIENT: ${DATABASE_CLIENT}
|
||||
DATABASE_HOST: strapiDB
|
||||
DATABASE_NAME: ${DATABASE_NAME}
|
||||
DATABASE_USERNAME: ${DATABASE_USERNAME}
|
||||
DATABASE_PORT: ${DATABASE_PORT}
|
||||
JWT_SECRET: ${JWT_SECRET}
|
||||
ADMIN_JWT_SECRET: ${ADMIN_JWT_SECRET}
|
||||
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
|
||||
NODE_ENV: ${NODE_ENV}
|
||||
volumes:
|
||||
- ./.env:/opt/app/.env
|
||||
- ./public/uploads:/opt/app/public/uploads
|
||||
depends_on:
|
||||
- strapiDB
|
||||
healthcheck:
|
||||
test:
|
||||
- CMD
|
||||
- node
|
||||
- '-e'
|
||||
- "fetch('http://127.0.0.1:1337/admin').then((r) => {if (r.status !== 200) throw new Error(r.status)})"
|
||||
timeout: 5s
|
||||
interval: 5s
|
||||
retries: 3
|
||||
|
||||
nicwandsDB:
|
||||
container_name: nicwandsDB
|
||||
platform: linux/amd64
|
||||
restart: unless-stopped
|
||||
env_file: .env
|
||||
image: postgres:14.5-alpine
|
||||
environment:
|
||||
POSTGRES_USER: ${DATABASE_USERNAME}
|
||||
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
|
||||
POSTGRES_DB: ${DATABASE_NAME}
|
||||
volumes:
|
||||
- nicwands-data:/var/lib/postgresql/data/
|
||||
strapiDB:
|
||||
container_name: strapiDB
|
||||
platform: linux/amd64
|
||||
restart: unless-stopped
|
||||
env_file: .env
|
||||
image: postgres:14.5-alpine
|
||||
environment:
|
||||
POSTGRES_USER: ${DATABASE_USERNAME}
|
||||
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
|
||||
POSTGRES_DB: ${DATABASE_NAME}
|
||||
volumes:
|
||||
- strapi-data:/var/lib/postgresql/data/
|
||||
|
||||
nicwandsAdminer:
|
||||
container_name: nicwandsAdminer
|
||||
image: adminer
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- ADMINER_DEFAULT_SERVER=nicwandsDB
|
||||
depends_on:
|
||||
- nicwandsDB
|
||||
strapiAdminer:
|
||||
container_name: strapiAdminer
|
||||
image: adminer
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- ADMINER_DEFAULT_SERVER=strapiDB
|
||||
depends_on:
|
||||
- strapiDB
|
||||
|
||||
volumes:
|
||||
nicwands-data:
|
||||
strapi-data:
|
||||
|
||||
networks:
|
||||
nicwands:
|
||||
name: nicwands
|
||||
driver: bridge
|
||||
strapi:
|
||||
name: strapi
|
||||
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",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"description": "A Strapi application",
|
||||
"scripts": {
|
||||
"build": "strapi build",
|
||||
"console": "strapi console",
|
||||
"deploy": "strapi deploy",
|
||||
"dev": "strapi develop",
|
||||
"develop": "strapi develop",
|
||||
"start": "strapi start",
|
||||
"strapi": "strapi",
|
||||
"upgrade": "npx @strapi/upgrade latest",
|
||||
"upgrade:dry": "npx @strapi/upgrade latest --dry"
|
||||
},
|
||||
"dependencies": {
|
||||
"@strapi/plugin-cloud": "5.46.1",
|
||||
"@strapi/plugin-users-permissions": "5.46.1",
|
||||
"@strapi/strapi": "5.46.1",
|
||||
"pg": "8.20.0",
|
||||
"react": "^18.0.0",
|
||||
"react-dom": "^18.0.0",
|
||||
"react-router-dom": "^6.0.0",
|
||||
"styled-components": "^6.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20",
|
||||
"@types/react": "^18",
|
||||
"@types/react-dom": "^18",
|
||||
"better-sqlite3": "^12.10.0",
|
||||
"typescript": "^5"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.0.0 <=24.x.x",
|
||||
"npm": ">=6.0.0"
|
||||
},
|
||||
"strapi": {
|
||||
"uuid": "33974e7e-e7a6-4572-985a-e2ef467f2114",
|
||||
"installId": "d119f403157b783e98a16f85355418da5240a3859fbe1bb4683f7b3df6324fe5"
|
||||
}
|
||||
"name": "cms-nicwands-com",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"description": "A Strapi application",
|
||||
"scripts": {
|
||||
"build": "strapi build",
|
||||
"console": "strapi console",
|
||||
"deploy": "strapi deploy",
|
||||
"dev": "strapi develop",
|
||||
"develop": "strapi develop",
|
||||
"start": "strapi start",
|
||||
"strapi": "strapi",
|
||||
"upgrade": "npx @strapi/upgrade latest",
|
||||
"upgrade:dry": "npx @strapi/upgrade latest --dry"
|
||||
},
|
||||
"dependencies": {
|
||||
"@strapi/plugin-cloud": "5.47.1",
|
||||
"@strapi/plugin-users-permissions": "5.47.1",
|
||||
"@strapi/strapi": "5.47.1",
|
||||
"better-sqlite3": "^12.10.0",
|
||||
"pg": "8.20.0",
|
||||
"react": "^18.0.0",
|
||||
"react-dom": "^18.0.0",
|
||||
"react-router-dom": "^6.0.0",
|
||||
"styled-components": "^6.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20",
|
||||
"@types/react": "^18",
|
||||
"@types/react-dom": "^18",
|
||||
"typescript": "^5"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.0.0 <=24.x.x",
|
||||
"npm": ">=6.0.0"
|
||||
},
|
||||
"strapi": {
|
||||
"uuid": "226ed072-1db6-4f93-b888-095cae9f3e5c",
|
||||
"installId": "3c81cee5923221a8cfb80780ef853fb60670f459af5e899344d83559ab34f268"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ export default {
|
|||
// 'fr',
|
||||
// 'cs',
|
||||
// 'de',
|
||||
// 'dk',
|
||||
// 'da',
|
||||
// 'es',
|
||||
// 'he',
|
||||
// 'id',
|
||||
|
|
|
|||
|
|
@ -11,10 +11,12 @@
|
|||
},
|
||||
"pluginOptions": {},
|
||||
"attributes": {
|
||||
"content": {
|
||||
"type": "blocks"
|
||||
"mosaic_items": {
|
||||
"type": "component",
|
||||
"component": "global.mosaic-item",
|
||||
"repeatable": true
|
||||
},
|
||||
"SEO": {
|
||||
"seo": {
|
||||
"type": "component",
|
||||
"component": "global.seo",
|
||||
"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",
|
||||
"info": {
|
||||
"displayName": "SEO",
|
||||
"icon": "stack"
|
||||
"icon": "filter"
|
||||
},
|
||||
"options": {},
|
||||
"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';
|
||||
|
||||
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 {
|
||||
collectionName: 'components_global_seos';
|
||||
info: {
|
||||
displayName: 'SEO';
|
||||
icon: 'stack';
|
||||
icon: 'filter';
|
||||
};
|
||||
attributes: {
|
||||
description: Schema.Attribute.Text;
|
||||
|
|
@ -16,6 +28,7 @@ export interface GlobalSeo extends Struct.ComponentSchema {
|
|||
declare module '@strapi/strapi' {
|
||||
export module Public {
|
||||
export interface ComponentSchemas {
|
||||
'global.mosaic-item': GlobalMosaicItem;
|
||||
'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;
|
||||
};
|
||||
attributes: {
|
||||
content: Schema.Attribute.Blocks;
|
||||
createdAt: Schema.Attribute.DateTime;
|
||||
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||
Schema.Attribute.Private;
|
||||
|
|
@ -461,8 +460,9 @@ export interface ApiGlobalGlobal extends Struct.SingleTypeSchema {
|
|||
'api::global.global'
|
||||
> &
|
||||
Schema.Attribute.Private;
|
||||
mosaic_items: Schema.Attribute.Component<'global.mosaic-item', true>;
|
||||
publishedAt: Schema.Attribute.DateTime;
|
||||
SEO: Schema.Attribute.Component<'global.seo', false>;
|
||||
seo: Schema.Attribute.Component<'global.seo', false>;
|
||||
updatedAt: Schema.Attribute.DateTime;
|
||||
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||
Schema.Attribute.Private;
|
||||
|
|
|
|||
Loading…
Reference in a new issue