rename blog entry to blog post
parent
16727b4921
commit
d4b7654be5
@ -0,0 +1,9 @@
|
|||||||
|
.tmp/
|
||||||
|
.cache/
|
||||||
|
.git/
|
||||||
|
.env
|
||||||
|
build/
|
||||||
|
node_modules/
|
||||||
|
# Ignoring folders that might be used in starter templates
|
||||||
|
data/
|
||||||
|
backup/
|
@ -1,19 +1,28 @@
|
|||||||
FROM node:18-alpine3.18
|
# Creating multi-stage build for production
|
||||||
|
FROM node:18-alpine as build
|
||||||
RUN apk update && apk add --no-cache build-base gcc autoconf automake zlib-dev libpng-dev nasm bash vips-dev git
|
RUN apk update && apk add --no-cache build-base gcc autoconf automake zlib-dev libpng-dev vips-dev git > /dev/null 2>&1
|
||||||
ARG NODE_ENV=development
|
ENV NODE_ENV=production
|
||||||
ENV NODE_ENV=${NODE_ENV}
|
|
||||||
|
|
||||||
WORKDIR /opt/
|
WORKDIR /opt/
|
||||||
COPY package.json yarn.lock ./
|
COPY package.json yarn.lock ./
|
||||||
RUN yarn global add node-gyp
|
RUN yarn global add node-gyp
|
||||||
RUN yarn config set network-timeout 600000 -g && yarn install
|
RUN yarn config set network-timeout 600000 -g && yarn install --production
|
||||||
ENV PATH /opt/node_modules/.bin:$PATH
|
ENV PATH /opt/node_modules/.bin:$PATH
|
||||||
|
|
||||||
WORKDIR /opt/app
|
WORKDIR /opt/app
|
||||||
COPY . .
|
COPY . .
|
||||||
|
RUN yarn build
|
||||||
|
|
||||||
|
# Creating final production image
|
||||||
|
FROM node:18-alpine
|
||||||
|
RUN apk add --no-cache vips-dev
|
||||||
|
ENV NODE_ENV=production
|
||||||
|
WORKDIR /opt/
|
||||||
|
COPY --from=build /opt/node_modules ./node_modules
|
||||||
|
WORKDIR /opt/app
|
||||||
|
COPY --from=build /opt/app ./
|
||||||
|
ENV PATH /opt/node_modules/.bin:$PATH
|
||||||
|
|
||||||
RUN chown -R node:node /opt/app
|
RUN chown -R node:node /opt/app
|
||||||
USER node
|
USER node
|
||||||
RUN ["yarn", "build"]
|
|
||||||
EXPOSE 1337
|
EXPOSE 1337
|
||||||
CMD ["yarn", "develop"]
|
CMD ["yarn", "start"]
|
||||||
|
@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
"kind": "collectionType",
|
||||||
|
"collectionName": "authors",
|
||||||
|
"info": {
|
||||||
|
"singularName": "author",
|
||||||
|
"pluralName": "authors",
|
||||||
|
"displayName": "Author"
|
||||||
|
},
|
||||||
|
"options": {
|
||||||
|
"draftAndPublish": true
|
||||||
|
},
|
||||||
|
"pluginOptions": {},
|
||||||
|
"attributes": {
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"profilePicture": {
|
||||||
|
"allowedTypes": [
|
||||||
|
"images",
|
||||||
|
"files",
|
||||||
|
"videos",
|
||||||
|
"audios"
|
||||||
|
],
|
||||||
|
"type": "media",
|
||||||
|
"multiple": true
|
||||||
|
},
|
||||||
|
"slug": {
|
||||||
|
"type": "uid"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,9 +1,9 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* blog-entry controller
|
* author controller
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const { createCoreController } = require('@strapi/strapi').factories;
|
const { createCoreController } = require('@strapi/strapi').factories;
|
||||||
|
|
||||||
module.exports = createCoreController('api::blog-entry.blog-entry');
|
module.exports = createCoreController('api::author.author');
|
@ -1,9 +1,9 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* blog-entry router
|
* author router
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const { createCoreRouter } = require('@strapi/strapi').factories;
|
const { createCoreRouter } = require('@strapi/strapi').factories;
|
||||||
|
|
||||||
module.exports = createCoreRouter('api::blog-entry.blog-entry');
|
module.exports = createCoreRouter('api::author.author');
|
@ -1,9 +1,9 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* blog-entry service
|
* author service
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const { createCoreService } = require('@strapi/strapi').factories;
|
const { createCoreService } = require('@strapi/strapi').factories;
|
||||||
|
|
||||||
module.exports = createCoreService('api::blog-entry.blog-entry');
|
module.exports = createCoreService('api::author.author');
|
@ -1,21 +0,0 @@
|
|||||||
{
|
|
||||||
"kind": "collectionType",
|
|
||||||
"collectionName": "blog_entries",
|
|
||||||
"info": {
|
|
||||||
"singularName": "blog-entry",
|
|
||||||
"pluralName": "blog-entries",
|
|
||||||
"displayName": "Blog Entry"
|
|
||||||
},
|
|
||||||
"options": {
|
|
||||||
"draftAndPublish": true
|
|
||||||
},
|
|
||||||
"pluginOptions": {},
|
|
||||||
"attributes": {
|
|
||||||
"content": {
|
|
||||||
"type": "blocks"
|
|
||||||
},
|
|
||||||
"Title": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"kind": "collectionType",
|
||||||
|
"collectionName": "blog_posts",
|
||||||
|
"info": {
|
||||||
|
"singularName": "blog-post",
|
||||||
|
"pluralName": "blog-posts",
|
||||||
|
"displayName": "Blog Post"
|
||||||
|
},
|
||||||
|
"options": {
|
||||||
|
"draftAndPublish": true
|
||||||
|
},
|
||||||
|
"pluginOptions": {},
|
||||||
|
"attributes": {
|
||||||
|
"slug": {
|
||||||
|
"type": "uid"
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"author": {
|
||||||
|
"type": "relation",
|
||||||
|
"relation": "oneToOne",
|
||||||
|
"target": "api::author.author"
|
||||||
|
},
|
||||||
|
"content": {
|
||||||
|
"type": "richtext"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* blog-post controller
|
||||||
|
*/
|
||||||
|
|
||||||
|
const { createCoreController } = require('@strapi/strapi').factories;
|
||||||
|
|
||||||
|
module.exports = createCoreController('api::blog-post.blog-post');
|
@ -0,0 +1,9 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* blog-post router
|
||||||
|
*/
|
||||||
|
|
||||||
|
const { createCoreRouter } = require('@strapi/strapi').factories;
|
||||||
|
|
||||||
|
module.exports = createCoreRouter('api::blog-post.blog-post');
|
@ -0,0 +1,9 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* blog-post service
|
||||||
|
*/
|
||||||
|
|
||||||
|
const { createCoreService } = require('@strapi/strapi').factories;
|
||||||
|
|
||||||
|
module.exports = createCoreService('api::blog-post.blog-post');
|
Loading…
Reference in New Issue