Skip to content

Commit

Permalink
refactor: 文档
Browse files Browse the repository at this point in the history
  • Loading branch information
zuihou committed Feb 5, 2024
1 parent faac00d commit aa1291e
Showing 1 changed file with 28 additions and 25 deletions.
53 changes: 28 additions & 25 deletions 01-docs/docker/03.docker运行项目.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,68 +92,71 @@ cd /data/dockerfile/nginx
```
1, 先到项目`跟目录`将整个项目编译一次: clean install -DskipTests=true -T8 -f pom.xml
cd zuihou-backend/zuihou-authority/zuihou-authority-server
docker build --build-arg JAR_FILE=target/zuihou-authority-server.jar -t zuihou-authority-server:v1 .
cd lamp-authority/lamp-authority-server
docker build --build-arg JAR_FILE=target/lamp-authority-server.jar -t lamp-authority-server:v1 .
cd zuihou-backend/zuihou-msgs/zuihou-msgs-server
docker build -t zuihou-msgs-server:v1 .
cd lamp-msgs/lamp-msgs-server
docker build --build-arg JAR_FILE=target/lamp-msgs-server.jar -t lamp-msgs-server:v1 .
cd zuihou-backend/zuihou-file/zuihou-file-server
docker build -t zuihou-file-server:v1 .
cd lamp-file/lamp-file-server
docker build --build-arg JAR_FILE=target/lamp-file-server.jar -t lamp-file-server:v1 .
cd zuihou-backend/zuihou-gateway/zuihou-zuul-server
docker build -t zuihou-zuul-server:v1 .
cd lamp-gateway/lamp-gateway-server
docker build --build-arg JAR_FILE=target/lamp-gateway-server.jar -t lamp-gateway-server:v1 .
cd zuihou-backend/zuihou-jobs/zuihou-jobs-server
docker build -t zuihou-jobs-server:v1 .
cd lamp-oauth/lamp-oauth-server
docker build --build-arg JAR_FILE=target/lamp-oauth-server.jar -t lamp-oauth-server:v1 .
```

## 7,使用docker启动项目
```
1, 确保: nacos mysql redis 全部启动, 并且nacos 里面的redis mysql 等ip改成自己的ip (切记,使用docker时,所有的IP都不能为127.0.0.1)
2, 在nacos 里面新建 zuihou-authority-server-docker.yml ,并将所有zuihou-authority-server-dev.yml 里面的配置复制过去,修改docker环境和dev环境的差异部分部分。
2, 在nacos 里面新建 lamp-authority-server-docker.yml ,并将所有lamp-authority-server-dev.yml 里面的配置复制过去,修改docker环境和dev环境的差异部分部分。
docker run -idt --name zuihou-authority-server --restart=always \
docker run -idt --name lamp-authority-server --restart=always \
-e NACOS_IP=192.168.1.34 \
-e NACOS_PORT=8848 \
-e LOCAL_IP=192.168.1.34 \
-e NACOS_ID=b16f7baf-56e7-4f4e-a26c-425ee0668016 \
-p 8764:8764 \
-v /data/:/data \
zuihou-authority-server:v1
lamp-authority-server:v1
docker run -idt --name zuihou-zuul-server --restart=always \
docker run -idt --name lamp-gateway-server --restart=always \
-e NACOS_IP=192.168.1.34 \
-e NACOS_PORT=8848 \
-e LOCAL_IP=192.168.1.34 \
-e NACOS_ID=b16f7baf-56e7-4f4e-a26c-425ee0668016 \
-p 8760:8760 \
-v /data/:/data \
zuihou-zuul-server:v1
lamp-gateway-server:v1
docker run -idt --name zuihou-msgs-server --restart=always \
docker run -idt --name lamp-msgs-server --restart=always \
-e NACOS_IP=192.168.1.34 \
-e NACOS_PORT=8848 \
-e LOCAL_IP=192.168.1.34 \
-e NACOS_ID=b16f7baf-56e7-4f4e-a26c-425ee0668016 \
-p 8768:8768 \
-v /data/:/data \
zuihou-msgs-server:v1
lamp-msgs-server:v1
docker run -idt --name zuihou-file-server --restart=always \
docker run -idt --name lamp-file-server --restart=always \
-e NACOS_IP=192.168.1.34 \
-e NACOS_PORT=8848 \
-e LOCAL_IP=192.168.1.34 \
-e NACOS_ID=b16f7baf-56e7-4f4e-a26c-425ee0668016 \
-p 8765:8765 \
-v /data/:/data \
zuihou-file-server:v1
docker run -idt --name zuihou-jobs-server --restart=always \
-e MYSQL_IP=192.168.1.34 \
-p 8767:8767 \
lamp-file-server:v1
docker run -idt --name lamp-oauth-server --restart=always \
-e NACOS_IP=192.168.1.34 \
-e NACOS_PORT=8848 \
-e LOCAL_IP=192.168.1.34 \
-e NACOS_ID=b16f7baf-56e7-4f4e-a26c-425ee0668016 \
-p 8765:8765 \
-v /data/:/data \
zuihou-jobs-server:v1
lamp-oauth-server:v1
```

Expand All @@ -169,7 +172,7 @@ docker run -idt --name zuihou-jobs-server --restart=always \
- MYSQL_MASTER_SERVICE_USER=nacos
- MYSQL_MASTER_SERVICE_PASSWORD=nacos
docker run -idt --name zuihou-nacos --restart=always \
docker run -idt --name lamp-nacos --restart=always \
-e JVM_XMS=512m -e JVM_XMX=512m -e JVM_XMN=384m \
-e PREFER_HOST_MODE=hostname -e MODE=standalone -e SPRING_DATASOURCE_PLATFORM=mysql \
-e MYSQL_DATABASE_NUM=1 \
Expand Down

0 comments on commit aa1291e

Please sign in to comment.