This part is about how to build Docker images and deploy using Docker images.
Download address: https://github.com/YaoApp/dockerfiles
git clone https://github.com/YaoApp/dockerfiles /path/root/dockerfiles
Build command:
docker build \--platform linux/amd64 \--build-arg REPO=${REPO} \--build-arg TOKEN=${TOKEN} \--build-arg VERSION=${VERSION} \-t ${ORG}/${NAME}:${VERSION} .
Example:
cd /path/root/dockerfiles/application/amd64docker build --platform linux/amd64 \--build-arg REPO=github.com/YaoApp/yao-wms \--build-arg TOKEN=xxxxxxxxx \--build-arg VERSION=1.0.3 \-t yaoapp/yao-wms:1.0.3-amd64 .
Build parameters:
parameter name | description | example |
---|---|---|
REPO | Application code repository address | github.com/YaoApp/yao-wms |
TOKEN | GitHub personal access token view documentation | ghp_xxxxxxxxxxxxxxxxxx |
VERSION | Application version number | 1.0.3 |
Build command:
docker build \--platform linux/arm64 \--build-arg REPO=${REPO} \--build-arg TOKEN=${TOKEN} \--build-arg VERSION=${VERSION} \-t ${ORG}/${NAME}:${VERSION} .
Example:
cd /path/root/dockerfiles/application/arm64docker build --platform linux/arm64 \--build-arg REPO=github.com/YaoApp/yao-wms \--build-arg TOKEN=xxxxxxxxx \--build-arg VERSION=1.0.3 \-t yaoapp/yao-wms:1.0.3-arm64 .
Build parameters:
parameter name | description | example |
---|---|---|
REPO | Application code repository address | github.com/YaoApp/yao-wms |
TOKEN | GitHub personal access token view documentation | ghp_xxxxxxxxxxxxxxxxxx |
VERSION | Application version number | 1.0.3 |
variable name | description | example |
---|---|---|
YAO_INIT | yaoadmin start Before starting for the first time, initialize data, allow demo to initialize data, and run DEMO processing, reset initialize data. If not set, no initialization operation will be performed | demo |
YAO_PROCESS_RESET | yaoadmin reset The processor to run after successfully migrating data | flows.init.menu |
YAO_PROCESS_DEMO | yaoadmin reset --with-demo Processor for generating demo data | flows.init.menu |
docker run -d -p 5099:5099 --restart unless-stopped \-e YAO_INIT=demo \-e YAO_PROCESS_RESET=flows.init.menu \-e YAO_PROCESS_DEMO=flows.demo.data \yaoapp/yao-wms:1.0.3-amd64
docker run -d -p 3307:3306 --restart unless-stopped -e MYSQL_PASSWORD=123456 yaoapp/mysql:8.0-amd64
docker run -d -p 5099:5099 --restart unless-stopped \-e YAO_INIT=demo \-e YAO_PROCESS_RESET=flows.init.menu \-e YAO_PROCESS_DEMO=flows.demo.data \-e YAO_DB_DRIVER=mysql \-e YAO_DB_PRIMARY="yao:123456@tcp(172.17.0.1:3307)/yao?charset=utf8mb4&parseTime=True&loc=Local" \yaoapp/yao-wms:1.0.3-amd64
Docker Compose
version: "3.9"services:yao:image: yaoapp/yao-wms:1.0.3-amd64environment:- YAO_INIT=demoYAO_PROCESS_RESET=flows.init.menuYAO_PROCESS_DEMO=flows.demo.dataYAO_DB_DRIVER=mysqlYAO_DB_PRIMARY="yao:123456@tcp(mysql:3306)/yao?charset=utf8mb4&parseTime=True&loc=Local"ports:- "5099:509
This part is about how to build Docker images and deploy using Docker images.
Download address: https://github.com/YaoApp/dockerfiles
git clone https://github.com/YaoApp/dockerfiles /path/root/dockerfiles
Build command:
docker build \--platform linux/amd64 \--build-arg REPO=${REPO} \--build-arg TOKEN=${TOKEN} \--build-arg VERSION=${VERSION} \-t ${ORG}/${NAME}:${VERSION} .
Example:
cd /path/root/dockerfiles/application/amd64docker build --platform linux/amd64 \--build-arg REPO=github.com/YaoApp/yao-wms \--build-arg TOKEN=xxxxxxxxx \--build-arg VERSION=1.0.3 \-t yaoapp/yao-wms:1.0.3-amd64 .
Build parameters:
parameter name | description | example |
---|---|---|
REPO | Application code repository address | github.com/YaoApp/yao-wms |
TOKEN | GitHub personal access token view documentation | ghp_xxxxxxxxxxxxxxxxxx |
VERSION | Application version number | 1.0.3 |
Build command:
docker build \--platform linux/arm64 \--build-arg REPO=${REPO} \--build-arg TOKEN=${TOKEN} \--build-arg VERSION=${VERSION} \-t ${ORG}/${NAME}:${VERSION} .
Example:
cd /path/root/dockerfiles/application/arm64docker build --platform linux/arm64 \--build-arg REPO=github.com/YaoApp/yao-wms \--build-arg TOKEN=xxxxxxxxx \--build-arg VERSION=1.0.3 \-t yaoapp/yao-wms:1.0.3-arm64 .
Build parameters:
parameter name | description | example |
---|---|---|
REPO | Application code repository address | github.com/YaoApp/yao-wms |
TOKEN | GitHub personal access token view documentation | ghp_xxxxxxxxxxxxxxxxxx |
VERSION | Application version number | 1.0.3 |
variable name | description | example |
---|---|---|
YAO_INIT | yaoadmin start Before starting for the first time, initialize data, allow demo to initialize data, and run DEMO processing, reset initialize data. If not set, no initialization operation will be performed | demo |
YAO_PROCESS_RESET | yaoadmin reset The processor to run after successfully migrating data | flows.init.menu |
YAO_PROCESS_DEMO | yaoadmin reset --with-demo Processor for generating demo data | flows.init.menu |
docker run -d -p 5099:5099 --restart unless-stopped \-e YAO_INIT=demo \-e YAO_PROCESS_RESET=flows.init.menu \-e YAO_PROCESS_DEMO=flows.demo.data \yaoapp/yao-wms:1.0.3-amd64
docker run -d -p 3307:3306 --restart unless-stopped -e MYSQL_PASSWORD=123456 yaoapp/mysql:8.0-amd64
docker run -d -p 5099:5099 --restart unless-stopped \-e YAO_INIT=demo \-e YAO_PROCESS_RESET=flows.init.menu \-e YAO_PROCESS_DEMO=flows.demo.data \-e YAO_DB_DRIVER=mysql \-e YAO_DB_PRIMARY="yao:123456@tcp(172.17.0.1:3307)/yao?charset=utf8mb4&parseTime=True&loc=Local" \yaoapp/yao-wms:1.0.3-amd64
Docker Compose
version: "3.9"services:yao:image: yaoapp/yao-wms:1.0.3-amd64environment:- YAO_INIT=demoYAO_PROCESS_RESET=flows.init.menuYAO_PROCESS_DEMO=flows.demo.dataYAO_DB_DRIVER=mysqlYAO_DB_PRIMARY="yao:123456@tcp(mysql:3306)/yao?charset=utf8mb4&parseTime=True&loc=Local"ports:- "5099:509