39 files changed
+24883
No files matched your search
@@ -0,0 +1,6 @@
|
|||||||
|
*.db
|
||||||
|
node_modules
|
||||||
|
.env
|
||||||
|
.cache
|
||||||
|
.tmp
|
||||||
|
build
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
DO_SPACE_KEY=<digital_ocean_space_key>
|
||||||
|
DO_SPACE_SECRET=<digital_ocean_space_secret>
|
||||||
|
DO_SPACE_REGION=<digital_ocean_space_region>
|
||||||
|
DO_SPACE_ENDPOINT=<digital_ocean_space_endpoint>
|
||||||
|
DO_SPACE_CDN=<digital_ocean_space_cdn_domain>
|
||||||
|
DO_SPACE=<digital_ocean_space>
|
||||||
|
ADMIN_JWT_SECRET=<admin_jwt_secret>
|
||||||
|
JWT_SECRET=<jwt_secret>
|
||||||
|
DATABASE_FILENAME=<path_to_sqlite_db>
|
||||||
|
HOST=0.0.0.0
|
||||||
|
PORT=80
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
FROM node:14-alpine
|
||||||
|
RUN apk add --no-cache git
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY package.json package-lock.json ./
|
||||||
|
RUN npm ci
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
EXPOSE 80
|
||||||
|
ENV PORT 80
|
||||||
|
ENV NODE_ENV production
|
||||||
|
|
||||||
|
CMD ["sh", "-c", "npm start"]
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
# Hudozka strapi CMS
|
||||||
|
|
||||||
|
A quick description of your strapi application
|
||||||
Whitespace-only changes.
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"routes": [
|
||||||
|
{
|
||||||
|
"method": "GET",
|
||||||
|
"path": "/home",
|
||||||
|
"handler": "home.find",
|
||||||
|
"config": {
|
||||||
|
"policies": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"method": "PUT",
|
||||||
|
"path": "/home",
|
||||||
|
"handler": "home.update",
|
||||||
|
"config": {
|
||||||
|
"policies": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"method": "DELETE",
|
||||||
|
"path": "/home",
|
||||||
|
"handler": "home.delete",
|
||||||
|
"config": {
|
||||||
|
"policies": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Read the documentation (https://strapi.io/documentation/developer-docs/latest/concepts/controllers.html#core-controllers)
|
||||||
|
* to customize this controller
|
||||||
|
*/
|
||||||
|
|
||||||
|
module.exports = {};
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Read the documentation (https://strapi.io/documentation/developer-docs/latest/concepts/models.html#lifecycle-hooks)
|
||||||
|
* to customize this model
|
||||||
|
*/
|
||||||
|
|
||||||
|
module.exports = {};
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
"kind": "singleType",
|
||||||
|
"collectionName": "homes",
|
||||||
|
"info": {
|
||||||
|
"name": "Home",
|
||||||
|
"description": ""
|
||||||
|
},
|
||||||
|
"options": {
|
||||||
|
"increments": true,
|
||||||
|
"timestamps": true,
|
||||||
|
"draftAndPublish": false
|
||||||
|
},
|
||||||
|
"attributes": {
|
||||||
|
"title": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"cards": {
|
||||||
|
"type": "dynamiczone",
|
||||||
|
"components": [
|
||||||
|
"hudozka.page-card"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Read the documentation (https://strapi.io/documentation/developer-docs/latest/concepts/services.html#core-services)
|
||||||
|
* to customize this service
|
||||||
|
*/
|
||||||
|
|
||||||
|
module.exports = {};
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
{
|
||||||
|
"routes": [
|
||||||
|
{
|
||||||
|
"method": "GET",
|
||||||
|
"path": "/pages",
|
||||||
|
"handler": "page.find",
|
||||||
|
"config": {
|
||||||
|
"policies": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"method": "GET",
|
||||||
|
"path": "/pages/count",
|
||||||
|
"handler": "page.count",
|
||||||
|
"config": {
|
||||||
|
"policies": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"method": "GET",
|
||||||
|
"path": "/pages/:id",
|
||||||
|
"handler": "page.findOne",
|
||||||
|
"config": {
|
||||||
|
"policies": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"method": "POST",
|
||||||
|
"path": "/pages",
|
||||||
|
"handler": "page.create",
|
||||||
|
"config": {
|
||||||
|
"policies": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"method": "PUT",
|
||||||
|
"path": "/pages/:id",
|
||||||
|
"handler": "page.update",
|
||||||
|
"config": {
|
||||||
|
"policies": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"method": "DELETE",
|
||||||
|
"path": "/pages/:id",
|
||||||
|
"handler": "page.delete",
|
||||||
|
"config": {
|
||||||
|
"policies": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Read the documentation (https://strapi.io/documentation/developer-docs/latest/concepts/controllers.html#core-controllers)
|
||||||
|
* to customize this controller
|
||||||
|
*/
|
||||||
|
|
||||||
|
module.exports = {};
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Read the documentation (https://strapi.io/documentation/developer-docs/latest/concepts/models.html#lifecycle-hooks)
|
||||||
|
* to customize this model
|
||||||
|
*/
|
||||||
|
|
||||||
|
module.exports = {};
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
{
|
||||||
|
"kind": "collectionType",
|
||||||
|
"collectionName": "pages",
|
||||||
|
"info": {
|
||||||
|
"name": "Page",
|
||||||
|
"description": ""
|
||||||
|
},
|
||||||
|
"options": {
|
||||||
|
"increments": true,
|
||||||
|
"timestamps": true,
|
||||||
|
"draftAndPublish": true
|
||||||
|
},
|
||||||
|
"attributes": {
|
||||||
|
"title": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"excerpt": {
|
||||||
|
"type": "text"
|
||||||
|
},
|
||||||
|
"cover": {
|
||||||
|
"model": "file",
|
||||||
|
"via": "related",
|
||||||
|
"allowedTypes": [
|
||||||
|
"images"
|
||||||
|
],
|
||||||
|
"plugin": "upload",
|
||||||
|
"required": false
|
||||||
|
},
|
||||||
|
"content": {
|
||||||
|
"type": "dynamiczone",
|
||||||
|
"components": [
|
||||||
|
"hudozka.document",
|
||||||
|
"hudozka.image",
|
||||||
|
"hudozka.text",
|
||||||
|
"hudozka.embed"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"tags": {
|
||||||
|
"collection": "tag",
|
||||||
|
"via": "page"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Read the documentation (https://strapi.io/documentation/developer-docs/latest/concepts/services.html#core-services)
|
||||||
|
* to customize this service
|
||||||
|
*/
|
||||||
|
|
||||||
|
module.exports = {};
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
{
|
||||||
|
"routes": [
|
||||||
|
{
|
||||||
|
"method": "GET",
|
||||||
|
"path": "/tags",
|
||||||
|
"handler": "tag.find",
|
||||||
|
"config": {
|
||||||
|
"policies": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"method": "GET",
|
||||||
|
"path": "/tags/count",
|
||||||
|
"handler": "tag.count",
|
||||||
|
"config": {
|
||||||
|
"policies": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"method": "GET",
|
||||||
|
"path": "/tags/:id",
|
||||||
|
"handler": "tag.findOne",
|
||||||
|
"config": {
|
||||||
|
"policies": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"method": "POST",
|
||||||
|
"path": "/tags",
|
||||||
|
"handler": "tag.create",
|
||||||
|
"config": {
|
||||||
|
"policies": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"method": "PUT",
|
||||||
|
"path": "/tags/:id",
|
||||||
|
"handler": "tag.update",
|
||||||
|
"config": {
|
||||||
|
"policies": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"method": "DELETE",
|
||||||
|
"path": "/tags/:id",
|
||||||
|
"handler": "tag.delete",
|
||||||
|
"config": {
|
||||||
|
"policies": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Read the documentation (https://strapi.io/documentation/developer-docs/latest/concepts/controllers.html#core-controllers)
|
||||||
|
* to customize this controller
|
||||||
|
*/
|
||||||
|
|
||||||
|
module.exports = {};
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Read the documentation (https://strapi.io/documentation/developer-docs/latest/concepts/models.html#lifecycle-hooks)
|
||||||
|
* to customize this model
|
||||||
|
*/
|
||||||
|
|
||||||
|
module.exports = {};
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"kind": "collectionType",
|
||||||
|
"collectionName": "tags",
|
||||||
|
"info": {
|
||||||
|
"name": "Tag"
|
||||||
|
},
|
||||||
|
"options": {
|
||||||
|
"increments": true,
|
||||||
|
"timestamps": true,
|
||||||
|
"draftAndPublish": false
|
||||||
|
},
|
||||||
|
"attributes": {
|
||||||
|
"slug": {
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"unique": true,
|
||||||
|
"minLength": 3
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"page": {
|
||||||
|
"via": "tags",
|
||||||
|
"model": "page"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Read the documentation (https://strapi.io/documentation/developer-docs/latest/concepts/services.html#core-services)
|
||||||
|
* to customize this service
|
||||||
|
*/
|
||||||
|
|
||||||
|
module.exports = {};
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"collectionName": "components_hudozka_documents",
|
||||||
|
"info": {
|
||||||
|
"name": "Document",
|
||||||
|
"icon": "file"
|
||||||
|
},
|
||||||
|
"options": {},
|
||||||
|
"attributes": {
|
||||||
|
"media": {
|
||||||
|
"model": "file",
|
||||||
|
"via": "related",
|
||||||
|
"allowedTypes": [
|
||||||
|
"files"
|
||||||
|
],
|
||||||
|
"plugin": "upload",
|
||||||
|
"required": false
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"collectionName": "components_hudozka_embeds",
|
||||||
|
"info": {
|
||||||
|
"name": "Embed",
|
||||||
|
"icon": "vial"
|
||||||
|
},
|
||||||
|
"options": {},
|
||||||
|
"attributes": {
|
||||||
|
"src": {
|
||||||
|
"type": "string",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"collectionName": "components_hudozka_images",
|
||||||
|
"info": {
|
||||||
|
"name": "Image",
|
||||||
|
"icon": "image"
|
||||||
|
},
|
||||||
|
"options": {},
|
||||||
|
"attributes": {
|
||||||
|
"media": {
|
||||||
|
"model": "file",
|
||||||
|
"via": "related",
|
||||||
|
"allowedTypes": [
|
||||||
|
"images"
|
||||||
|
],
|
||||||
|
"plugin": "upload",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
"wide": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"collectionName": "components_hudozka_page_cards",
|
||||||
|
"info": {
|
||||||
|
"name": "PageCard",
|
||||||
|
"icon": "award"
|
||||||
|
},
|
||||||
|
"options": {},
|
||||||
|
"attributes": {
|
||||||
|
"page": {
|
||||||
|
"model": "page"
|
||||||
|
},
|
||||||
|
"layout": {
|
||||||
|
"type": "enumeration",
|
||||||
|
"enum": [
|
||||||
|
"small",
|
||||||
|
"medium",
|
||||||
|
"big"
|
||||||
|
],
|
||||||
|
"default": "small",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"collectionName": "components_hudozka_texts",
|
||||||
|
"info": {
|
||||||
|
"name": "Text",
|
||||||
|
"icon": "candy-cane"
|
||||||
|
},
|
||||||
|
"options": {},
|
||||||
|
"attributes": {
|
||||||
|
"text": {
|
||||||
|
"type": "richtext",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
module.exports = ({ env }) => ({
|
||||||
|
defaultConnection: 'default',
|
||||||
|
connections: {
|
||||||
|
default: {
|
||||||
|
connector: 'bookshelf',
|
||||||
|
settings: {
|
||||||
|
client: 'sqlite',
|
||||||
|
filename: env('DATABASE_FILENAME', '.tmp/data.db'),
|
||||||
|
},
|
||||||
|
options: {
|
||||||
|
useNullAsDefault: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An asynchronous bootstrap function that runs before
|
||||||
|
* your application gets started.
|
||||||
|
*
|
||||||
|
* This gives you an opportunity to set up your data model,
|
||||||
|
* run jobs, or perform some special logic.
|
||||||
|
*
|
||||||
|
* See more details here: https://strapi.io/documentation/v3.x/concepts/configurations.html#bootstrap
|
||||||
|
*/
|
||||||
|
|
||||||
|
module.exports = () => {};
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cron config that gives you an opportunity
|
||||||
|
* to run scheduled jobs.
|
||||||
|
*
|
||||||
|
* The cron format consists of:
|
||||||
|
* [SECOND (optional)] [MINUTE] [HOUR] [DAY OF MONTH] [MONTH OF YEAR] [DAY OF WEEK]
|
||||||
|
*
|
||||||
|
* See more details here: https://strapi.io/documentation/v3.x/concepts/configurations.html#cron-tasks
|
||||||
|
*/
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
/**
|
||||||
|
* Simple example.
|
||||||
|
* Every monday at 1am.
|
||||||
|
*/
|
||||||
|
// '0 1 * * 1': () => {
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
};
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
module.exports = async (/* ctx */) => {
|
||||||
|
// return ctx.notFound('My custom message 404');
|
||||||
|
};
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
module.exports = ({ env }) => ({
|
||||||
|
upload: {
|
||||||
|
provider: 'digitalocean',
|
||||||
|
providerOptions: {
|
||||||
|
key: env('DO_SPACE_KEY', ''),
|
||||||
|
secret: env('DO_SPACE_SECRET', ''),
|
||||||
|
endpoint: env('DO_SPACE_ENDPOINT', ''),
|
||||||
|
space: env('DO_SPACE', ''),
|
||||||
|
region: env('DO_SPACE_REGION', ''),
|
||||||
|
cdnDomain: env('DO_SPACE_CDN', ''),
|
||||||
|
cdn: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
module.exports = ({ env }) => ({
|
||||||
|
host: env('HOST', '0.0.0.0'),
|
||||||
|
port: env.int('PORT', 1337),
|
||||||
|
admin: {
|
||||||
|
auth: {
|
||||||
|
secret: env('ADMIN_JWT_SECRET', '<admin_jwt_secret>'),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
Whitespace-only changes.
@@ -0,0 +1,3 @@
|
|||||||
|
module.exports = {
|
||||||
|
jwtSecret: process.env.JWT_SECRET || '<jwt_secret>'
|
||||||
|
};
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
+13655
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"name": "hudozka-strapi-api",
|
||||||
|
"private": true,
|
||||||
|
"version": "0.1.0",
|
||||||
|
"description": "A Strapi application",
|
||||||
|
"scripts": {
|
||||||
|
"develop": "strapi develop",
|
||||||
|
"start": "strapi start",
|
||||||
|
"build": "strapi build",
|
||||||
|
"strapi": "strapi"
|
||||||
|
},
|
||||||
|
"devDependencies": {},
|
||||||
|
"dependencies": {
|
||||||
|
"strapi-provider-upload-digitalocean": "git+https://github.com/iliyat/strapi-provider-upload-digitalocean.git",
|
||||||
|
"strapi": "3.4.5",
|
||||||
|
"strapi-admin": "3.4.5",
|
||||||
|
"strapi-utils": "3.4.5",
|
||||||
|
"strapi-plugin-content-type-builder": "3.4.5",
|
||||||
|
"strapi-plugin-content-manager": "3.4.5",
|
||||||
|
"strapi-plugin-users-permissions": "3.4.5",
|
||||||
|
"strapi-plugin-email": "3.4.5",
|
||||||
|
"strapi-plugin-upload": "3.4.5",
|
||||||
|
"strapi-connector-bookshelf": "3.4.5",
|
||||||
|
"knex": "<0.20.0",
|
||||||
|
"sqlite3": "latest"
|
||||||
|
},
|
||||||
|
"author": {
|
||||||
|
"name": "A Strapi developer"
|
||||||
|
},
|
||||||
|
"strapi": {
|
||||||
|
"uuid": "d54aa6bd-8d50-4bb1-80ac-d905410453e0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=14.x.x",
|
||||||
|
"npm": ">=6.0.0"
|
||||||
|
},
|
||||||
|
"license": "MIT"
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
# To prevent search engines from seeing the site altogether, uncomment the next two lines:
|
||||||
|
# User-Agent: *
|
||||||
|
# Disallow: /
|
||||||
Whitespace-only changes.
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user