Merge branch 'develop'
commit
89d1f0abd6
|
@ -1,6 +1,6 @@
|
||||||
## myems-aggregation
|
## myems-aggregation
|
||||||
|
|
||||||
MyEMS Aggregation Service
|
Data Aggregation Service
|
||||||
|
|
||||||
数据汇总服务
|
数据汇总服务
|
||||||
|
|
||||||
|
@ -31,26 +31,51 @@ chmod +x run.sh
|
||||||
|
|
||||||
In this section, you will install myems-aggregation on Docker.
|
In this section, you will install myems-aggregation on Docker.
|
||||||
|
|
||||||
* Copy example.env file to .env file and modify the .env file
|
* Copy source code to root directory
|
||||||
|
|
||||||
|
On Windows:
|
||||||
|
```bash
|
||||||
|
cp -r myems/myems-aggregation c:\
|
||||||
|
cd c:\myems-aggregation
|
||||||
|
```
|
||||||
|
|
||||||
|
On Linux:
|
||||||
|
```bash
|
||||||
|
cp -r myems/myems-aggregation /
|
||||||
|
cd /myems/myems-aggregation
|
||||||
|
```
|
||||||
|
|
||||||
|
* Duplicate example.env file as .env file and modify the .env file
|
||||||
|
Replace ~~127.0.0.1~~ with real **HOST** IP address.
|
||||||
```bash
|
```bash
|
||||||
cd myems/myems-aggregation
|
|
||||||
cp example.env .env
|
cp example.env .env
|
||||||
```
|
```
|
||||||
|
|
||||||
* Build a Docker image
|
* Build a Docker image
|
||||||
```bash
|
```bash
|
||||||
docker build -t myems/myems-aggregation .
|
docker build -t myems/myems-aggregation .
|
||||||
```
|
```
|
||||||
* Run a Docker container
|
* Run a Docker container
|
||||||
|
On Windows host, bind-mount the .env to the container:
|
||||||
```bash
|
```bash
|
||||||
docker run -d --restart always --name myems-aggregation myems/myems-aggregation
|
docker run -d -v c:\myems-aggregation\.env:/code/.env --restart always --name myems-aggregation myems/myems-aggregation
|
||||||
```
|
```
|
||||||
|
On Linux host, bind-mount the .env to the container:
|
||||||
|
```bash
|
||||||
|
docker run -d -p 8000:8000 -v /myems-aggregation/.env:/.env --restart always --name myems-aggregation myems/myems-aggregation
|
||||||
|
```
|
||||||
|
* -d Run container in background and print container ID
|
||||||
|
|
||||||
-d Run container in background and print container ID
|
* -v If you use -v or --volume to bind-mount a file or directory that does not yet exist on the Docker host, -v creates the endpoint for you. It is always created as a directory.
|
||||||
|
|
||||||
--restart Restart policy to apply when a container exits
|
* --restart Restart policy to apply when a container exits
|
||||||
|
|
||||||
--name Assign a name to the container
|
* --name Assign a name to the container
|
||||||
|
|
||||||
|
The absolute path before colon is for path on host and that may vary on your system.
|
||||||
|
The absolute path after colon is for path on container and that CANNOT be changed.
|
||||||
|
By passing .env as bind-mount parameter, you can change the configuration values later.
|
||||||
|
If you changed .env file, restart the container to make the change effective.
|
||||||
|
|
||||||
If you want to immigrate the image to another computer,
|
If you want to immigrate the image to another computer,
|
||||||
* Export image to tarball file
|
* Export image to tarball file
|
||||||
|
|
|
@ -56,7 +56,7 @@ cd c:\myems-api
|
||||||
On Linux:
|
On Linux:
|
||||||
```bash
|
```bash
|
||||||
cp -r myems/myems-api /
|
cp -r myems/myems-api /
|
||||||
cd /myems/myems-api
|
cd /myems-api
|
||||||
```
|
```
|
||||||
|
|
||||||
* Duplicate example.env file as .env file and modify the .env file
|
* Duplicate example.env file as .env file and modify the .env file
|
||||||
|
@ -71,12 +71,12 @@ docker build -t myems/myems-api .
|
||||||
```
|
```
|
||||||
* Run a Docker container
|
* Run a Docker container
|
||||||
On Windows host, bind-mount a share upload folder at c:\myems-upload to the container,
|
On Windows host, bind-mount a share upload folder at c:\myems-upload to the container,
|
||||||
and also bind-mount the .env to the container.
|
and also bind-mount the .env to the container:
|
||||||
```bash
|
```bash
|
||||||
docker run -d -p 8000:8000 -v c:\myems-upload:/var/www/html/admin/upload -v c:\myems-api\.env:/code/.env --restart always --name myems-api myems/myems-api
|
docker run -d -p 8000:8000 -v c:\myems-upload:/var/www/html/admin/upload -v c:\myems-api\.env:/code/.env --restart always --name myems-api myems/myems-api
|
||||||
```
|
```
|
||||||
On Linux host, bind-mount a share upload file folder at /myems-upload to the container,
|
On Linux host, bind-mount a share upload file folder at /myems-upload to the container,
|
||||||
and also bind-mount the .env to the container.
|
and also bind-mount the .env to the container:
|
||||||
```bash
|
```bash
|
||||||
docker run -d -p 8000:8000 -v /myems-upload:/var/www/html/admin/upload -v /myems-api/.env:/.env --restart always --name myems-api myems/myems-api
|
docker run -d -p 8000:8000 -v /myems-upload:/var/www/html/admin/upload -v /myems-api/.env:/.env --restart always --name myems-api myems/myems-api
|
||||||
```
|
```
|
||||||
|
|
|
@ -30,26 +30,51 @@ chmod +x run.sh
|
||||||
|
|
||||||
In this section, you will install myems-cleaning on Docker.
|
In this section, you will install myems-cleaning on Docker.
|
||||||
|
|
||||||
* Copy example.env file to .env file and modify the .env file
|
* Copy source code to root directory
|
||||||
|
|
||||||
|
On Windows:
|
||||||
|
```bash
|
||||||
|
cp -r myems/myems-cleaning c:\
|
||||||
|
cd c:\myems-cleaning
|
||||||
|
```
|
||||||
|
|
||||||
|
On Linux:
|
||||||
|
```bash
|
||||||
|
cp -r myems/myems-cleaning /
|
||||||
|
cd /myems-cleaning
|
||||||
|
```
|
||||||
|
|
||||||
|
* Duplicate example.env file as .env file and modify the .env file
|
||||||
|
Replace ~~127.0.0.1~~ with real **HOST** IP address.
|
||||||
```bash
|
```bash
|
||||||
cd myems/myems-cleaning
|
|
||||||
cp example.env .env
|
cp example.env .env
|
||||||
```
|
```
|
||||||
|
|
||||||
* Build a Docker image
|
* Build a Docker image
|
||||||
```bash
|
```bash
|
||||||
docker build -t myems/myems-cleaning .
|
docker build -t myems/myems-cleaning .
|
||||||
```
|
```
|
||||||
* Run a Docker container
|
* Run a Docker container
|
||||||
|
On Windows host, bind-mount the .env to the container:
|
||||||
```bash
|
```bash
|
||||||
docker run -d --restart always --name myems-cleaning myems/myems-cleaning
|
docker run -d -v c:\myems-cleaning\.env:/code/.env --restart always --name myems-cleaning myems/myems-cleaning
|
||||||
```
|
```
|
||||||
|
On Linux host, bind-mount the .env to the container:
|
||||||
|
```bash
|
||||||
|
docker run -d -p 8000:8000 -v /myems-cleaning/.env:/.env --restart always --name myems-cleaning myems/myems-cleaning
|
||||||
|
```
|
||||||
|
* -d Run container in background and print container ID
|
||||||
|
|
||||||
-d Run container in background and print container ID
|
* -v If you use -v or --volume to bind-mount a file or directory that does not yet exist on the Docker host, -v creates the endpoint for you. It is always created as a directory.
|
||||||
|
|
||||||
--restart Restart policy to apply when a container exits
|
* --restart Restart policy to apply when a container exits
|
||||||
|
|
||||||
--name Assign a name to the container
|
* --name Assign a name to the container
|
||||||
|
|
||||||
|
The absolute path before colon is for path on host and that may vary on your system.
|
||||||
|
The absolute path after colon is for path on container and that CANNOT be changed.
|
||||||
|
By passing .env as bind-mount parameter, you can change the configuration values later.
|
||||||
|
If you changed .env file, restart the container to make the change effective.
|
||||||
|
|
||||||
If you want to immigrate the image to another computer,
|
If you want to immigrate the image to another computer,
|
||||||
* Export image to tarball file
|
* Export image to tarball file
|
||||||
|
|
|
@ -29,29 +29,53 @@ chmod +x run.sh
|
||||||
|
|
||||||
In this section, you will install myems-modbus-tcp on Docker.
|
In this section, you will install myems-modbus-tcp on Docker.
|
||||||
|
|
||||||
* Copy example.env file to .env file and modify the .env file
|
In this section, you will install myems-modbus-tcp on Docker.
|
||||||
Note: There is a default Gateway Token in example.env,
|
|
||||||
if you run more than one myems-modbus-tcp instances,
|
|
||||||
please create new Gateway and get new token in Admin UI.
|
|
||||||
|
|
||||||
|
* Copy source code to root directory
|
||||||
|
|
||||||
|
On Windows:
|
||||||
|
```bash
|
||||||
|
cp -r myems/myems-modbus-tcp c:\
|
||||||
|
cd c:\myems-modbus-tcp
|
||||||
|
```
|
||||||
|
|
||||||
|
On Linux:
|
||||||
|
```bash
|
||||||
|
cp -r myems/myems-modbus-tcp /
|
||||||
|
cd /myems-modbus-tcp
|
||||||
|
```
|
||||||
|
|
||||||
|
* Duplicate example.env file as .env file and modify the .env file
|
||||||
|
Replace ~~127.0.0.1~~ with real **HOST** IP address.
|
||||||
```bash
|
```bash
|
||||||
cd myems/myems-modbus-tcp
|
|
||||||
cp example.env .env
|
cp example.env .env
|
||||||
```
|
```
|
||||||
|
|
||||||
* Build a Docker image
|
* Build a Docker image
|
||||||
```bash
|
```bash
|
||||||
docker build -t myems/myems-modbus-tcp .
|
docker build -t myems/myems-modbus-tcp .
|
||||||
```
|
```
|
||||||
* Run a Docker container
|
* Run a Docker container
|
||||||
|
On Windows host, bind-mount the .env to the container:
|
||||||
```bash
|
```bash
|
||||||
docker run -d --restart always --name myems-modbus-tcp myems/myems-modbus-tcp
|
docker run -d -v c:\myems-modbus-tcp\.env:/code/.env --restart always --name myems-modbus-tcp myems/myems-modbus-tcp
|
||||||
```
|
```
|
||||||
|
On Linux host, bind-mount the .env to the container:
|
||||||
|
```bash
|
||||||
|
docker run -d -p 8000:8000 -v /myems-modbus-tcp/.env:/.env --restart always --name myems-modbus-tcp myems/myems-modbus-tcp
|
||||||
|
```
|
||||||
|
* -d Run container in background and print container ID
|
||||||
|
|
||||||
-d Run container in background and print container ID
|
* -v If you use -v or --volume to bind-mount a file or directory that does not yet exist on the Docker host, -v creates the endpoint for you. It is always created as a directory.
|
||||||
|
|
||||||
--restart Restart policy to apply when a container exits
|
* --restart Restart policy to apply when a container exits
|
||||||
|
|
||||||
--name Assign a name to the container
|
* --name Assign a name to the container
|
||||||
|
|
||||||
|
The absolute path before colon is for path on host and that may vary on your system.
|
||||||
|
The absolute path after colon is for path on container and that CANNOT be changed.
|
||||||
|
By passing .env as bind-mount parameter, you can change the configuration values later.
|
||||||
|
If you changed .env file, restart the container to make the change effective.
|
||||||
|
|
||||||
If you want to immigrate the image to another computer,
|
If you want to immigrate the image to another computer,
|
||||||
* Export image to tarball file
|
* Export image to tarball file
|
||||||
|
|
|
@ -37,26 +37,51 @@ chmod +x run.sh
|
||||||
|
|
||||||
In this section, you will install myems-normalization on Docker.
|
In this section, you will install myems-normalization on Docker.
|
||||||
|
|
||||||
* Copy example.env file to .env file and modify the .env file
|
* Copy source code to root directory
|
||||||
|
|
||||||
|
On Windows:
|
||||||
|
```bash
|
||||||
|
cp -r myems/myems-normalization c:\
|
||||||
|
cd c:\myems-normalization
|
||||||
|
```
|
||||||
|
|
||||||
|
On Linux:
|
||||||
|
```bash
|
||||||
|
cp -r myems/myems-normalization /
|
||||||
|
cd /myems-normalization
|
||||||
|
```
|
||||||
|
|
||||||
|
* Duplicate example.env file as .env file and modify the .env file
|
||||||
|
Replace ~~127.0.0.1~~ with real **HOST** IP address.
|
||||||
```bash
|
```bash
|
||||||
cd myems/myems-normalization
|
|
||||||
cp example.env .env
|
cp example.env .env
|
||||||
```
|
```
|
||||||
|
|
||||||
* Build a Docker image
|
* Build a Docker image
|
||||||
```bash
|
```bash
|
||||||
docker build -t myems/myems-normalization .
|
docker build -t myems/myems-normalization .
|
||||||
```
|
```
|
||||||
* Run a Docker container
|
* Run a Docker container
|
||||||
|
On Windows host, bind-mount the .env to the container:
|
||||||
```bash
|
```bash
|
||||||
docker run -d --restart always --name myems-normalization myems/myems-normalization
|
docker run -d -v c:\myems-normalization\.env:/code/.env --restart always --name myems-normalization myems/myems-normalization
|
||||||
```
|
```
|
||||||
|
On Linux host, bind-mount the .env to the container:
|
||||||
|
```bash
|
||||||
|
docker run -d -p 8000:8000 -v /myems-normalization/.env:/.env --restart always --name myems-normalization myems/myems-normalization
|
||||||
|
```
|
||||||
|
* -d Run container in background and print container ID
|
||||||
|
|
||||||
-d Run container in background and print container ID
|
* -v If you use -v or --volume to bind-mount a file or directory that does not yet exist on the Docker host, -v creates the endpoint for you. It is always created as a directory.
|
||||||
|
|
||||||
--restart Restart policy to apply when a container exits
|
* --restart Restart policy to apply when a container exits
|
||||||
|
|
||||||
--name Assign a name to the container
|
* --name Assign a name to the container
|
||||||
|
|
||||||
|
The absolute path before colon is for path on host and that may vary on your system.
|
||||||
|
The absolute path after colon is for path on container and that CANNOT be changed.
|
||||||
|
By passing .env as bind-mount parameter, you can change the configuration values later.
|
||||||
|
If you changed .env file, restart the container to make the change effective.
|
||||||
|
|
||||||
If you want to immigrate the image to another computer,
|
If you want to immigrate the image to another computer,
|
||||||
* Export image to tarball file
|
* Export image to tarball file
|
||||||
|
|
Loading…
Reference in New Issue