How to strapi

Posted by Hi@Yoese on Thursday, October 22, 2020

How to strapi

什么是 Strapi

安装

命令行 安装

# yarn create strapi-app my-project --quickstart
yarn create strapi-app my-project

yarn develop

Docker 安装

如果是测试,本地实验性质,推荐这个方式。快,简单 官方安装手册

version: '3'
services:
  strapi:
    image: strapi/strapi
    environment:
      DATABASE_CLIENT: mongo
      DATABASE_NAME: strapi
      DATABASE_HOST: mongo
      DATABASE_PORT: 27017
      DATABASE_USERNAME: strapi
      DATABASE_PASSWORD: strapi
    volumes:
      - ./app:/srv/app
    ports:
      - '1337:1337'
    depends_on:
      - mongo

  mongo:
    image: mongo
    environment:
      MONGO_INITDB_DATABASE: strapi
      MONGO_INITDB_ROOT_USERNAME: strapi
      MONGO_INITDB_ROOT_PASSWORD: strapi
    volumes:
      - ./data:/data/db

「真诚赞赏,手留余香」

Hi@Yoese

真诚赞赏,手留余香

使用微信扫描二维码完成支付