From 22739afa2da4dd38eda9077f5ca566cd022f4dc2 Mon Sep 17 00:00:00 2001 From: chenos Date: Sat, 17 Apr 2021 22:47:08 +0800 Subject: [PATCH] docs: nodejs provided by docker --- README.md | 21 +++++++++++++++++++++ README.zh-CN.md | 18 ++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/README.md b/README.md index 5e49bd7406..4e1b4f6772 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,27 @@ npm run db-migrate init npm start ~~~ +Nodejs provided by docker + +```shell +git clone https://github.com/nocobase/nocobase.git +cd nocobase +# You can use docker to start the database +docker-compose up -d postgres +# Set Environment Variables +cp .env.example .env + +# Installing dependencies and initializing +docker-compose run nocobase bash -c 'npm install && npm run bootstrap && npm run build && npm run db-migrate init' + +# Start nocobase +docker-compose up nocobase -d + +# View log +docker-compose logs nocobase +``` + + Build ---------- diff --git a/README.zh-CN.md b/README.zh-CN.md index 8f4187c057..095d79e7ed 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -128,6 +128,24 @@ npm run db-migrate init npm start ~~~ +如果本地 node 有问题,可以使用 docker 提供的环境 + +```shell +git clone https://github.com/nocobase/nocobase.git +cd nocobase +docker-compose up -d postgres # 用 docker 启动数据库 +cp .env.example .env # 配置数据库信息、APP 端口等 + +# 使用 docker 提供的 node 环境安装依赖与初始化 +docker-compose run nocobase bash -c 'npm install && npm run bootstrap && npm run build && npm run db-migrate init' + +# 启动 nocobase 应用 +docker-compose up nocobase -d + +# 查看日志 +docker-compose logs nocobase +``` + 打包 ----------