# Docker 安装 (👍 推荐) ## 0. 先决条件 ⚡⚡ 请确保你已经安装了 [Docker](https://docs.docker.com/get-docker/) ## 1. 将 NocoBase 下载到本地 使用 Git 下载(或直接[下载 Zip 包](https://github.com/nocobase/nocobase/archive/refs/heads/main.zip),并解压到 nocobase 目录下) ```bash git clone https://github.com/nocobase/nocobase.git nocobase ``` ## 2. 选择数据库(任选其一) 支持 SQLite、MySQL、PostgreSQL 数据库 ```bash # SQLite cd nocobase/docker/app-sqlite # MySQL cd nocobase/docker/app-mysql # PostgreSQL cd nocobase/docker/app-postgres ``` ## 3. 安装并启动 NocoBase 安装过程可能需要等待几十秒钟 ```bash # 在后台运行 $ docker-compose up -d # 查看 app 进程的情况 $ docker-compose logs app app-sqlite-app-1 | nginx started app-sqlite-app-1 | yarn run v1.22.15 app-sqlite-app-1 | $ cross-env DOTENV_CONFIG_PATH=.env node -r dotenv/config packages/app/server/lib/index.js install -s app-sqlite-app-1 | Done in 2.72s. app-sqlite-app-1 | yarn run v1.22.15 app-sqlite-app-1 | $ pm2-runtime start --node-args="-r dotenv/config" packages/app/server/lib/index.js -- start app-sqlite-app-1 | 2022-04-28T15:45:38: PM2 log: Launching in no daemon mode app-sqlite-app-1 | 2022-04-28T15:45:38: PM2 log: App [index:0] starting in -fork mode- 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/ ``` ## 4. 登录 NocoBase 使用浏览器打开 http://localhost:13000/ 初始化账号和密码是 `admin@nocobase.com` 和 `admin123`。