Strapi
Strapi is the leading open-source headless CMS that gives developers the freedom to choose their favorite tools and frameworks while allowing content editors to manage content through a beautiful admin panel. It provides a fully customizable API (REST and GraphQL) with auto-generated endpoints based on your content types. This stack deploys Strapi backed by PostgreSQL 16 for production-ready data storage with persistence for uploads and configuration. Strapi features a visual content-type builder, role-based access control, internationalization (i18n), draft/publish workflows, media library, and a plugin marketplace. It supports custom controllers, services, policies, and middlewares for extending the API with custom business logic. After deployment, access the admin panel on port 1337/admin to create your first administrator account and start building your content types.
शामिल सर्विसेज़
strapi
strapi/strapi:latest
एनवायरनमेंट वेरिएबल्स:
postgres
postgres:16-alpine
एनवायरनमेंट वेरिएबल्स:
जनरेटेड YAML
# Generated by ComposeHub (composehub.dev)
name: strapi
services:
strapi:
image: strapi/strapi:latest
restart: always
ports:
- 1337:1337
volumes:
- strapi_app:/srv/app
environment:
DATABASE_CLIENT: postgres
DATABASE_HOST: postgres
DATABASE_PORT: "5432"
DATABASE_NAME: ${POSTGRES_DB:-strapi}
DATABASE_USERNAME: ${POSTGRES_USER:-strapi}
DATABASE_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
JWT_SECRET: ${JWT_SECRET:-changeme-generate-a-random-string}
ADMIN_JWT_SECRET: ${ADMIN_JWT_SECRET:-changeme-generate-a-random-string}
APP_KEYS: ${APP_KEYS:-key1,key2,key3,key4}
API_TOKEN_SALT: ${API_TOKEN_SALT:-changeme}
TRANSFER_TOKEN_SALT: ${TRANSFER_TOKEN_SALT:-changeme}
NODE_ENV: ${NODE_ENV:-production}
networks:
- strapi
depends_on:
postgres:
condition: service_healthy
healthcheck:
test:
- CMD-SHELL
- curl -f http://localhost:1337/_health || exit 1
interval: 30s
timeout: 10s
retries: 5
start_period: 90s
deploy:
resources:
limits:
cpus: "2.00"
memory: 1536M
reservations:
cpus: "0.50"
memory: 512M
labels:
com.composehub.description: Strapi headless CMS application server
postgres:
image: postgres:16-alpine
restart: always
volumes:
- strapi_db:/var/lib/postgresql/data
environment:
POSTGRES_DB: ${POSTGRES_DB:-strapi}
POSTGRES_USER: ${POSTGRES_USER:-strapi}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
networks:
- strapi
healthcheck:
test:
- CMD-SHELL
- pg_isready -U ${POSTGRES_USER:-strapi} -d ${POSTGRES_DB:-strapi}
interval: 5s
timeout: 5s
retries: 10
start_period: 30s
deploy:
resources:
limits:
cpus: "1.00"
memory: 512M
reservations:
cpus: "0.25"
memory: 128M
labels:
com.composehub.description: PostgreSQL 16 database for Strapi
networks:
strapi:
driver: bridge
volumes:
strapi_app:
driver: local
strapi_db:
driver: local
त्वरित जानकारी
- सर्विसेज़
- 2
- नेटवर्क्स
- 1
- वॉल्यूम्स
- 2
कब उपयोग करें
यह टेम्पलेट एक strapi एनवायरनमेंट सेटअप के लिए आदर्श है। सभी सर्विसेज़ healthchecks, रिसोर्स लिमिट्स और उचित डिफ़ॉल्ट सेटिंग्स के साथ पहले से कॉन्फ़िगर्ड हैं। प्रोडक्शन में डिप्लॉय करने से पहले एनवायरनमेंट वेरिएबल्स कस्टमाइज़ करें।
सुझाव
- डिप्लॉय करने से पहले सभी डिफ़ॉल्ट पासवर्ड बदलें
- अपने हार्डवेयर के अनुसार रिसोर्स लिमिट्स की समीक्षा करें
- प्रोडक्शन HTTPS के लिए रिवर्स प्रॉक्सी जोड़ें
- डेटा वॉल्यूम्स के लिए बैकअप रणनीतियाँ कॉन्फ़िगर करें