同步操作将从 MyEMS/MyEMS能源管理系统 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
Create and start all the services with a single command
Note: The host refers to the server on which the docker engine runs. The IP and account password are assumed and used to show instructions. Please modify them as appropriate.
-- | -- |
---|---|
Host IP | 192.168.0.1 |
Database IP | 192.168.0.2 |
Database User | root |
Database Password | !MyEMS1 |
git clone https://gitee.com/myems/myems.git
cd myems/database/install
mysql -u root -p < myems_billing_baseline_db.sql
mysql -u root -p < myems_billing_db.sql
mysql -u root -p < myems_carbon_db.sql
mysql -u root -p < myems_energy_baseline_db.sql
mysql -u root -p < myems_energy_db.sql
mysql -u root -p < myems_energy_model_db.sql
mysql -u root -p < myems_fdd_db.sql
mysql -u root -p < myems_historical_db.sql
mysql -u root -p < myems_production_db.sql
mysql -u root -p < myems_reporting_db.sql
mysql -u root -p < myems_system_db.sql
mysql -u root -p < myems_user_db.sql
Note: Refer to database/README.md
Note:Assume the host IP is 192.168.0.1, the database IP is 192.168.0.2, the database account is: root, and the database password is: !MyEMS1, please modify them as appropriate
3.1 Modify API's address in nginx.conf
cd myems
nano myems-admin/nginx.conf
nano myems-web/nginx.conf
3.2 Copy example.env to .env in each folder and modify database IP, username and password in .env
cd myems
cp myems-aggregation/example.env myems-aggregation/.env
nano myems-aggregation/.env
cp myems-api/example.env myems-api/.env
nano myems-api/.env
cp myems-cleaning/example.env myems-cleaning/.env
nano myems-cleaning/.env
cp myems-modbus-tcp/example.env myems-modbus-tcp/.env
nano myems-modbus-tcp/.env
cp myems-normalization/example.env myems-normalization/.env
nano myems-normalization/.env
3.3 Modify upload folder in docker-compose.yml If Windows host, use c:\upload for volumes/source in api and admin services. If Linux host, use /upload for volumes/source in api and admin services. Make sure the upload folders in api and admin are same folder on host.
cd myems/myems-web
npm i --unsafe-perm=true --allow-root --legacy-peer-deps
npm run build
On Windows Host:
cd myems
docker-compose -f docker-compose-on-windows.yml up -d
On Linux Host:
cd myems
docker-compose -f docker-compose-on-linux.yml up -d
Address | Expected Result | |
---|---|---|
myems-web | 192.168.0.1:80 | Login succeeded by entering account and password |
myems-admin | 192.168.0.1:8001 | Login succeeded by entering account and password |
myems-api | 192.168.0.1:8000/version | Return version information |
Note:If the API reports an error, please confirm Whether the database IP, database account and database password in .env are correct. If not, please modify them then execute:
docker-compose up --build -d
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。