mirror of https://github.com/veops/cmdb.git
doc: add install.sh method in readme
This commit is contained in:
parent
18ffeb681f
commit
8f0107b46c
23
README.md
23
README.md
|
@ -73,20 +73,31 @@
|
|||
## 安装
|
||||
|
||||
### Docker 一键快速构建
|
||||
- 进入主目录(先安装 docker 环境, 注意要clone整个项目)
|
||||
|
||||
> 方法一
|
||||
- 第一步: 拷贝项目
|
||||
```shell
|
||||
git clone https://github.com/veops/cmdb.git
|
||||
```
|
||||
- 第二步:进入主目录(先安装 docker 环境, 以及docker-compose)
|
||||
```
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
- 浏览器打开: [http://127.0.0.1:8000](http://127.0.0.1:8000)
|
||||
- username: demo 或者 admin
|
||||
- password: 123456
|
||||
> 方法二, 该方法适用于linux系统
|
||||
```shell
|
||||
curl -ssL https://raw.githubusercontent.com/veops/cmdb/dev_install/install.sh -o install.sh
|
||||
sh istall.sh install
|
||||
```
|
||||
|
||||
### [本地开发环境搭建](docs/local.md)
|
||||
|
||||
### [Makefile 安装](docs/makefile.md)
|
||||
|
||||
## 验证
|
||||
- 浏览器打开: [http://127.0.0.1:8000](http://127.0.0.1:8000)
|
||||
- username: demo 或者 admin
|
||||
- password: 123456
|
||||
|
||||
|
||||
---
|
||||
|
||||
_**欢迎关注公众号(维易科技OneOps),关注后可加入微信群,进行产品和技术交流。**_
|
||||
|
|
|
@ -68,20 +68,41 @@
|
|||
|
||||
### One-Click Docker Quick Build
|
||||
|
||||
- Prepare: install docker and docker-compose
|
||||
> Method 1
|
||||
- step 1: **Prepare: install docker and docker-compose**
|
||||
- step 2: copy the repository
|
||||
```shell
|
||||
git clone https://github.com/veops/cmdb.git
|
||||
```
|
||||
- step 3: In directory cmdb:
|
||||
```
|
||||
docker-compose up -d
|
||||
```
|
||||
> Method 2
|
||||
- step 1: **Prepare: install docker and docker-compose**
|
||||
- step 2:
|
||||
```shell
|
||||
curl -ssL https://raw.githubusercontent.com/veops/cmdb/master/install.sh -o install.sh
|
||||
sh istall.sh install
|
||||
```
|
||||
|
||||
- In directory cmdb
|
||||
```
|
||||
docker-compose up -d
|
||||
```
|
||||
- View: [http://127.0.0.1:8000](http://127.0.0.1:8000)
|
||||
- username: demo or admin
|
||||
- password: 123456
|
||||
|
||||
|
||||
|
||||
### [Local Setup](local_en.md)
|
||||
|
||||
### [Installation with Makefile](makefile_en.md)
|
||||
|
||||
## Validation
|
||||
|
||||
- View: [http://127.0.0.1:8000](http://127.0.0.1:8000)
|
||||
- username: demo or admin
|
||||
- password: 123456
|
||||
|
||||
## Contributing
|
||||
|
||||
1. Fork it
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
cmdb_dir="/home/$(whoami)/apps"
|
||||
cmdb_dir="~/apps"
|
||||
|
||||
check_docker() {
|
||||
if [ -x "$(command -v docker)" ]; then
|
||||
|
@ -129,6 +129,9 @@ uninstall_service() {
|
|||
current_path=$(pwd)
|
||||
cd ${cmdb_dir}/cmdb || exit 1
|
||||
docker-compose down -v
|
||||
if [ $? -eq 0 ];then
|
||||
rm -fr ${cmdb_dir}/cmdb
|
||||
fi
|
||||
cd $current_path || exit 1
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue