add dockerhub deploy way

This commit is contained in:
leucoon 2023-04-28 15:42:54 +08:00
parent dc19d1dc01
commit 22f600bfbd
4 changed files with 78 additions and 2 deletions

View file

@ -58,6 +58,7 @@
- [Usage](#usage) - [Usage](#usage)
- [Contact](#contact) - [Contact](#contact)
- [License](#license) - [License](#license)
- [Donate](#donate)
## Introduction ## Introduction
@ -170,7 +171,37 @@
### Docker(Optional) ### Docker(Optional)
+ download the source code and compile + Approach 1, download the image from docker hub
+ Step 1, install docker and download the image
```bash
sudo apt install docker.io
sudo docker pull modernwms/modernwms:1.0
```
+ Step 2deploy
```bash
sudo docker run -d -p 20011:20011 -p 80:80 modernwms/modernwms:1.0 ./run.sh
sudo docker ps -a | awk 'NR>1 && $2=="modernwms/modernwms:1.0" {print $1}'
sudo docker exec -it <CONTAINER ID> /bin/bash
```
After entering the Docker container, execute the following command in the container.
```bash
grep -rl "http://127.0.0.1:20011" /frontend | xargs sed -i 's#http://127.0.0.1:20011#http://IP address:20011#g'
exit
```
restart container
```bash
sudo docker restart <CONTAINER ID>
```
+ Approach 2, Build your own image
+ Step 1, download the source code + Step 1, download the source code
```bash ```bash
@ -240,3 +271,10 @@
## License ## License
Distributed under the [MIT](https://opensource.org/licenses/MIT/) License. See [LICENSE.txt](https://github.com/fjykTec/ModernWMS/master/LICENSE) for more information.This must be observed. Distributed under the [MIT](https://opensource.org/licenses/MIT/) License. See [LICENSE.txt](https://github.com/fjykTec/ModernWMS/master/LICENSE) for more information.This must be observed.
## Donate
If it's helpful to you, you can donate us by alipay,by wechat. Your support will encourage us to continue creating
<img src="alipay.jpg" alt="image3" height="auto" />
<img src="wechat.jpg" alt="image4" height="auto" />

View file

@ -59,6 +59,7 @@
- [联系我们](#联系我们) - [联系我们](#联系我们)
- [版权信息](#版权信息) - [版权信息](#版权信息)
- [特别声明](#特别声明) - [特别声明](#特别声明)
- [捐赠](#捐赠)
## 介绍 ## 介绍
@ -171,7 +172,37 @@
### Docker ### Docker
+ 下载源码后编译 + 方法 1: 直接从dockerhub中下载镜像
+ Step 1, 安装docker下载镜像
```bash
sudo apt install docker.io
sudo docker pull modernwms/modernwms:1.0
```
+ Step 2部署
```bash
sudo docker run -d -p 20011:20011 -p 80:80 modernwms/modernwms:1.0 ./run.sh
sudo docker ps -a | awk 'NR>1 && $2=="modernwms/modernwms:1.0" {print $1}'
sudo docker exec -it <CONTAINER ID> /bin/bash
```
进入docker容器后在容器中执行以下命令
```bash
grep -rl "http://127.0.0.1:20011" /frontend | xargs sed -i 's#http://127.0.0.1:20011#http://IP address:20011#g'
exit
```
重启容器
```bash
sudo docker restart <CONTAINER ID>
```
+ 方法 2: 自行构建镜像
+ 第一步,下载源码 + 第一步,下载源码
```bash ```bash
@ -244,3 +275,10 @@
本项目已加入 [dotNET China](https://gitee.com/dotnetchina) 组织。<br/> 本项目已加入 [dotNET China](https://gitee.com/dotnetchina) 组织。<br/>
![dotnetchina](https://gitee.com/dotnetchina/home/raw/master/assets/dotnetchina-raw.png "dotNET China LOGO") ![dotnetchina](https://gitee.com/dotnetchina/home/raw/master/assets/dotnetchina-raw.png "dotNET China LOGO")
## 捐赠
如果您觉得我的开源库可以帮到您,请我们的作者喝杯咖啡吧,您的支持将鼓励我们继续创作。
<img src="alipay.jpg" alt="image3" height="auto" />
<img src="wechat.jpg" alt="image4" height="auto" />

BIN
alipay.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 KiB

BIN
wechat.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB