Add Strapi CMS with Article and Category content types
Article is deliberately minimal: title, slug, Markdown body, cover image and category. No Author content type — the administrator is the only writer. The bootstrap hook grants the Public role find/findOne on the two content types and disables self-registration, so the public API is read-only and the site has no front-end accounts.
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
FROM node:22-alpine AS build
|
||||
WORKDIR /app
|
||||
# Sharp (image processing) needs these at install time on Alpine.
|
||||
RUN apk add --no-cache build-base python3 vips-dev
|
||||
COPY package*.json ./
|
||||
RUN npm ci
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
FROM node:22-alpine AS runtime
|
||||
WORKDIR /app
|
||||
RUN apk add --no-cache vips
|
||||
ENV NODE_ENV=production
|
||||
COPY --from=build /app /app
|
||||
RUN mkdir -p public/uploads && chown -R node:node /app
|
||||
USER node
|
||||
EXPOSE 1337
|
||||
CMD ["npm", "run", "start"]
|
||||
Reference in New Issue
Block a user