mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 05:57:53 +00:00
docs: update installation documentation
This commit is contained in:
parent
69f4aec355
commit
90623e8e9a
@ -46,9 +46,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ./:/var/www/app
|
- ./:/var/www/app
|
||||||
nocobase:
|
nocobase:
|
||||||
build:
|
image: node:16-stretch-slim
|
||||||
context: .
|
|
||||||
dockerfile: ./docker/node/Dockerfile
|
|
||||||
networks:
|
networks:
|
||||||
- nocobase
|
- nocobase
|
||||||
command: [ "yarn", "start" ]
|
command: [ "yarn", "start" ]
|
||||||
|
@ -25,9 +25,73 @@ cd nocobase/docker/app-mysql
|
|||||||
cd nocobase/docker/app-postgres
|
cd nocobase/docker/app-postgres
|
||||||
```
|
```
|
||||||
|
|
||||||
## 3. Install and start NocoBase
|
## 3. Configure docker-compose.yml (optional)
|
||||||
|
|
||||||
It may take dozens of seconds
|
Directory structure (related to docker)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
├── nocobase
|
||||||
|
├── docker
|
||||||
|
├── app-sqlite
|
||||||
|
├── storage
|
||||||
|
├── docker-compose.yml
|
||||||
|
├── app-mysql
|
||||||
|
├── storage
|
||||||
|
├── docker-compose.yml
|
||||||
|
├── app-postgres
|
||||||
|
├── storage
|
||||||
|
├── docker-compose.yml
|
||||||
|
```
|
||||||
|
|
||||||
|
Configuration notes for `docker-compose.yml`:
|
||||||
|
|
||||||
|
SQLite only has app service, PostgreSQL and MySQL will have corresponding postgres or mysql service, you can use the example database service or configure it yourself.
|
||||||
|
|
||||||
|
```yml
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
postgres:
|
||||||
|
mysql:
|
||||||
|
```
|
||||||
|
|
||||||
|
App port, the URL is `http://your-ip:13000/`
|
||||||
|
|
||||||
|
```yml
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
ports:
|
||||||
|
- "13000:80"
|
||||||
|
```
|
||||||
|
|
||||||
|
NocoBase version ([click here for the latest version](https://hub.docker.com/r/nocobase/nocobase/tags)). When upgrading, you need to change to the latest version.
|
||||||
|
|
||||||
|
```yml
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
image: nocobase/nocobase:0.7.0-alpha.78
|
||||||
|
```
|
||||||
|
|
||||||
|
Environment variables
|
||||||
|
|
||||||
|
```yml
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
image: nocobase/nocobase:0.7.0-alpha.78
|
||||||
|
environment:
|
||||||
|
- DB_DIALECT=postgres
|
||||||
|
- DB_HOST=postgres
|
||||||
|
- DB_DATABASE=nocobase
|
||||||
|
- DB_USER=nocobase
|
||||||
|
- DB_PASSWORD=nocobase
|
||||||
|
- LOCAL_STORAGE_BASE_URL=http://localhost:13000/storage/uploads
|
||||||
|
```
|
||||||
|
|
||||||
|
- `DB_*` is the database related, if it is not the default database service of the example, please change it according to the actual situation.
|
||||||
|
- `LOCAL_STORAGE_BASE_URL` is the base URL for local storage, if it is not a local installation, you need to change it to the corresponding ip or domain name.
|
||||||
|
|
||||||
|
## 4. Install and start NocoBase
|
||||||
|
|
||||||
|
It may take a few minutes
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# run in the background
|
# run in the background
|
||||||
|
@ -6,10 +6,10 @@
|
|||||||
|
|
||||||
## 1. 将 NocoBase 下载到本地
|
## 1. 将 NocoBase 下载到本地
|
||||||
|
|
||||||
使用 Git 下载(或直接[下载 Zip 包](https://github.com/nocobase/nocobase/archive/refs/heads/main.zip),并解压到 nocobase 目录下)
|
使用 Git 下载(或直接[下载 Zip 包](https://gitee.com/nocobase/nocobase/repository/archive/main.zip),并解压到 nocobase 目录下)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/nocobase/nocobase.git nocobase
|
git clone https://gitee.com/nocobase/nocobase.git nocobase
|
||||||
```
|
```
|
||||||
|
|
||||||
## 2. 选择数据库(任选其一)
|
## 2. 选择数据库(任选其一)
|
||||||
@ -25,9 +25,73 @@ cd nocobase/docker/app-mysql
|
|||||||
cd nocobase/docker/app-postgres
|
cd nocobase/docker/app-postgres
|
||||||
```
|
```
|
||||||
|
|
||||||
## 3. 安装并启动 NocoBase
|
## 3. 配置 docker-compose.yml(非必须)
|
||||||
|
|
||||||
安装过程可能需要等待几十秒钟
|
目录结构(与 docker 相关)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
├── nocobase
|
||||||
|
├── docker
|
||||||
|
├── app-sqlite
|
||||||
|
├── storage
|
||||||
|
├── docker-compose.yml
|
||||||
|
├── app-mysql
|
||||||
|
├── storage
|
||||||
|
├── docker-compose.yml
|
||||||
|
├── app-postgres
|
||||||
|
├── storage
|
||||||
|
├── docker-compose.yml
|
||||||
|
```
|
||||||
|
|
||||||
|
`docker-compose.yml` 的配置说明:
|
||||||
|
|
||||||
|
SQLite 只有 app 服务,PostgreSQL 和 MySQL 会有对应的 postgres 或 mysql 服务,可以使用例子的数据库服务,或者自己配置。
|
||||||
|
|
||||||
|
```yml
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
postgres:
|
||||||
|
mysql:
|
||||||
|
```
|
||||||
|
|
||||||
|
app 端口,例子为 13000 端口,访问地址为 `http://your-ip:13000/`
|
||||||
|
|
||||||
|
```yml
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
ports:
|
||||||
|
- "13000:80"
|
||||||
|
```
|
||||||
|
|
||||||
|
NocoBase 版本([点此查看最新版本](https://hub.docker.com/r/nocobase/nocobase/tags)),升级时,需要修改为最新版本。
|
||||||
|
|
||||||
|
```yml
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
image: nocobase/nocobase:0.7.0-alpha.78
|
||||||
|
```
|
||||||
|
|
||||||
|
环境变量
|
||||||
|
|
||||||
|
```yml
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
image: nocobase/nocobase:0.7.0-alpha.78
|
||||||
|
environment:
|
||||||
|
- DB_DIALECT=postgres
|
||||||
|
- DB_HOST=postgres
|
||||||
|
- DB_DATABASE=nocobase
|
||||||
|
- DB_USER=nocobase
|
||||||
|
- DB_PASSWORD=nocobase
|
||||||
|
- LOCAL_STORAGE_BASE_URL=http://localhost:13000/storage/uploads
|
||||||
|
```
|
||||||
|
|
||||||
|
- `DB_*` 为数据库相关,如果不是例子默认的数据库服务,请根据实际情况修改;
|
||||||
|
- `LOCAL_STORAGE_BASE_URL` 为本地存储的根 URL,如果不是本地安装,需要改为对应的 ip 或域名。
|
||||||
|
|
||||||
|
## 4. 安装并启动 NocoBase
|
||||||
|
|
||||||
|
安装过程可能需要等待几分钟
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 在后台运行
|
# 在后台运行
|
||||||
@ -47,6 +111,6 @@ app-sqlite-app-1 | 2022-04-28T15:45:38: PM2 log: App [index:0] online
|
|||||||
app-sqlite-app-1 | 🚀 NocoBase server running at: http://localhost:13000/
|
app-sqlite-app-1 | 🚀 NocoBase server running at: http://localhost:13000/
|
||||||
```
|
```
|
||||||
|
|
||||||
## 4. 登录 NocoBase
|
## 5. 登录 NocoBase
|
||||||
|
|
||||||
使用浏览器打开 http://localhost:13000/ 初始化账号和密码是 `admin@nocobase.com` 和 `admin123`。
|
使用浏览器打开 http://localhost:13000/ 初始化账号和密码是 `admin@nocobase.com` 和 `admin123`。
|
||||||
|
Loading…
Reference in New Issue
Block a user