add the README.md

pull/59/head
hyh123a 2021-08-06 17:20:08 +08:00
parent 1656d9b131
commit 162610b686
3 changed files with 108 additions and 4 deletions

View File

@ -65,15 +65,49 @@ MyEMS项目由下列组件构成:
### Docker Docker-compose 安装
```
# 假定你的本机IP为: 192.168.2.3 MySQL所在IP为: 192.168.2.2
# 步骤一: 克隆仓库
git clone https://gitee.com/myems/myems.git
# for generate the static direction: 'build'
# 步骤二: 修改IP地址
# 你应该修改所有文件夹下中config.py的host为你的本机IP
sudo nano myems-api/config.py
sudo nano myems-aggregation/config.py
sudo nano myems-cleaning/config.py
sudo nano myems-modbus-tcp/config.py
sudo nano myems-normalization/config.py
# host: '127.0.0.1' => 'host': '192.168.2.2', (127.0.0.1 => mysql_ip)
# 你应该修改web,admin下中nginx.conf的127.0.0.1为你的本机IP
sudo nano admin/nginx.conf
sudo nano web/nginx.conf
# proxy_pass http://127.0.0.1:8000/; => proxy_pass http://192.168.2.3:8000/; (127.0.0.1 => local_ip)
# 步骤三: 将'web'打包生成静态文件 (React)
cd myems/web
npm install
npm run build
# 步骤四: 使用docker-compose安装
cd myems
docker-compose up -d
# 步骤五: 测试是否成功 (use local_ip:192.168.2.3)
谷歌浏览器打开:
web page: http://192.168.2.3:8001 - 用户administrator@myems.io 密码: !MyEMS1
admin page: http://192.168.2.3:8002 - 用户administrator 密码: !MyEMS1
rest api: http://192.168.2.3:8000/spaces
```
## 功能版本对比

View File

@ -65,14 +65,48 @@ Dieses Projekt besteht aus folgenden Komponenten:
### Docker Docker-compose Installieren
```
# Angenommen, Ihre lokale IP: 192.168.2.3 und mysql IP: 192.168.2.2
# Schritt 01: Klon
git clone https://gitee.com/myems/myems.git
# for generate the static direction: 'build'
# Schritt 02: Ändern Sie die IP (mysql_ip: 192.168.2.2)
# Sie sollten den Host von config.py:
sudo nano myems-api/config.py
sudo nano myems-aggregation/config.py
sudo nano myems-cleaning/config.py
sudo nano myems-modbus-tcp/config.py
sudo nano myems-normalization/config.py
# host: '127.0.0.1' => 'host': '192.168.2.2', (127.0.0.1 => mysql_ip)
# Sie sollten den proxy_pass von nginx.conf:
sudo nano admin/nginx.conf
sudo nano web/nginx.conf
# proxy_pass http://127.0.0.1:8000/; => proxy_pass http://192.168.2.3:8000/; (127.0.0.1 => local_ip)
# Schritt 03: Generieren Sie die statische Richtung: 'build' for web (react)
cd myems/web
npm install
npm run build
# Schritt 04: Installieren
cd myems
docker-compose up -d
# Schritt 05: Prüfen (lokale ip: 192.168.2.3)
# mit dem Google-Browser öffnen
web: http://192.168.2.3:8001 - Benutzeradministrator@myems.io Passwort !MyEMS1
admin: http://192.168.2.3:8002 - Benutzeradministrator Passwort !MyEMS1
api: http://192.168.2.3:8000/spaces
```
## Editionen vergleichen

View File

@ -64,16 +64,52 @@ This project is compose of following components:
[Install web UI](./web/README.md)
### Docker Docker-compose Installation
### Docker Docker-compose Install
```
# Supposed that your local ip is: 192.168.2.3 and mysql ip is: 192.168.2.2
# Step 01: Clone
git clone https://gitee.com/myems/myems.git
# for generate the static direction: 'build'
# Step 02: Modify the ip (use mysql_ip: 192.168.2.2)
# You should modify the host of config.py in these directions:
sudo nano myems-api/config.py
sudo nano myems-aggregation/config.py
sudo nano myems-cleaning/config.py
sudo nano myems-modbus-tcp/config.py
sudo nano myems-normalization/config.py
# host: '127.0.0.1' => 'host': '192.168.2.2', (127.0.0.1 => mysql_ip)
# You should modify the proxy_pass of nginx.conf in these directions:
sudo nano admin/nginx.conf
sudo nano web/nginx.conf
# proxy_pass http://127.0.0.1:8000/; => proxy_pass http://192.168.2.3:8000/; (127.0.0.1 => local_ip)
# Step 03: Generate the static direction: 'build' for web (react)
cd myems/web
npm install
npm run build
# Step 04: Install
cd myems
docker-compose up -d
# Step 05: Test (use local_ip: 192.168.2.3)
# open with the google browser
web page: http://192.168.2.3:8001 - useradministrator@myems.io password !MyEMS1
admin page: http://192.168.2.3:8002 - useradministrator password !MyEMS1
rest api: http://192.168.2.3:8000/spaces
```
## Compare Editions