mirror of
https://gitee.com/nocobase/nocobase.git
synced 2024-11-29 18:58:26 +08:00
docs: nodejs provided by docker
This commit is contained in:
parent
95640ec57c
commit
22739afa2d
21
README.md
21
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
|
||||
----------
|
||||
|
||||
|
@ -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
|
||||
```
|
||||
|
||||
打包
|
||||
----------
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user