Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
5db2477ffc
@ -14,6 +14,7 @@
|
||||
<packaging>jar</packaging>
|
||||
<properties>
|
||||
<java.version>17</java.version>
|
||||
<docker.image.prefix>cdzy_ebike</docker.image.prefix>
|
||||
</properties>
|
||||
<dependencies>
|
||||
|
||||
@ -122,6 +123,24 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>1.2.2</version>
|
||||
<configuration>
|
||||
<!--远程Docker的地址-->
|
||||
<dockerHost>http://192.168.2.226:2375</dockerHost><!--镜像名称,前缀/项目名-->
|
||||
<imageName>${docker.image.prefix}/${project.artifactId}</imageName>
|
||||
<dockerDirectory>src/main/docker</dockerDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<targetPath>/</targetPath>
|
||||
<directory>${project.build.directory}</directory>
|
||||
<include>${project.build.finalName}.jar</include>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
21
ebike-gateway/src/main/docker/Dockerfile
Normal file
21
ebike-gateway/src/main/docker/Dockerfile
Normal file
@ -0,0 +1,21 @@
|
||||
|
||||
# 使用官方Eclipse Temurin镜像作为基础镜像(JDK17兼容Spring Boot 3.x)
|
||||
FROM eclipse-temurin:17-jdk-jammy
|
||||
|
||||
VOLUME /opt/docker-images
|
||||
|
||||
ADD ebike-gateway-0.0.1-SNAPSHOT.jar /ebike-gateway.jar
|
||||
|
||||
|
||||
# 设置JVM参数(根据实际需求调整)
|
||||
ENV JAVA_OPTS="-Xms512m -Xmx1024m"
|
||||
|
||||
# 暴露应用端口(与application.yml配置一致)
|
||||
EXPOSE 10010
|
||||
|
||||
# 健康检查配置
|
||||
HEALTHCHECK --interval=30s --timeout=3s \
|
||||
CMD curl -f http://localhost:10010/actuator/health || exit 1
|
||||
|
||||
# 容器启动命令
|
||||
ENTRYPOINT ["sh", "-c", "java ${JAVA_OPTS} -jar ebike-gateway.jar"]
|
||||
@ -15,6 +15,7 @@
|
||||
|
||||
<properties>
|
||||
<java.version>17</java.version>
|
||||
<docker.image.prefix>cdzy_ebike</docker.image.prefix>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
@ -134,6 +135,24 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>1.2.2</version>
|
||||
<configuration>
|
||||
<!--远程Docker的地址-->
|
||||
<dockerHost>http://192.168.2.226:2375</dockerHost><!--镜像名称,前缀/项目名-->
|
||||
<imageName>${docker.image.prefix}/${project.artifactId}</imageName>
|
||||
<dockerDirectory>src/main/docker</dockerDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<targetPath>/</targetPath>
|
||||
<directory>${project.build.directory}</directory>
|
||||
<include>${project.build.finalName}.jar</include>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
21
ebike-gather/src/main/docker/Dockerfile
Normal file
21
ebike-gather/src/main/docker/Dockerfile
Normal file
@ -0,0 +1,21 @@
|
||||
|
||||
# 使用官方Eclipse Temurin镜像作为基础镜像(JDK17兼容Spring Boot 3.x)
|
||||
FROM eclipse-temurin:17-jdk-jammy
|
||||
|
||||
VOLUME /opt/docker-images
|
||||
|
||||
ADD ebike-gather-0.0.1-SNAPSHOT.jar /ebike-gather.jar
|
||||
|
||||
|
||||
# 设置JVM参数(根据实际需求调整)
|
||||
ENV JAVA_OPTS="-Xms512m -Xmx1024m"
|
||||
|
||||
# 暴露应用端口(与application.yml配置一致)
|
||||
EXPOSE 10011
|
||||
|
||||
# 健康检查配置
|
||||
HEALTHCHECK --interval=30s --timeout=3s \
|
||||
CMD curl -f http://localhost:10011/actuator/health || exit 1
|
||||
|
||||
# 容器启动命令
|
||||
ENTRYPOINT ["sh", "-c", "java ${JAVA_OPTS} -jar ebike-gather.jar"]
|
||||
@ -15,6 +15,7 @@
|
||||
|
||||
<properties>
|
||||
<java.version>17</java.version>
|
||||
<docker.image.prefix>cdzy_ebike</docker.image.prefix>
|
||||
</properties>
|
||||
<dependencies>
|
||||
|
||||
@ -226,6 +227,24 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>1.2.2</version>
|
||||
<configuration>
|
||||
<!--远程Docker的地址-->
|
||||
<dockerHost>http://192.168.2.226:2375</dockerHost><!--镜像名称,前缀/项目名-->
|
||||
<imageName>${docker.image.prefix}/${project.artifactId}</imageName>
|
||||
<dockerDirectory>src/main/docker</dockerDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<targetPath>/</targetPath>
|
||||
<directory>${project.build.directory}</directory>
|
||||
<include>${project.build.finalName}.jar</include>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
21
ebike-maintenance/src/main/docker/Dockerfile
Normal file
21
ebike-maintenance/src/main/docker/Dockerfile
Normal file
@ -0,0 +1,21 @@
|
||||
|
||||
# 使用官方Eclipse Temurin镜像作为基础镜像(JDK17兼容Spring Boot 3.x)
|
||||
FROM eclipse-temurin:17-jdk-jammy
|
||||
|
||||
VOLUME /opt/docker-images
|
||||
|
||||
ADD ebike-maintenance-0.0.1-SNAPSHOT.jar /ebike-maintenance.jar
|
||||
|
||||
|
||||
# 设置JVM参数(根据实际需求调整)
|
||||
ENV JAVA_OPTS="-Xms512m -Xmx1024m"
|
||||
|
||||
# 暴露应用端口(与application.yml配置一致)
|
||||
EXPOSE 10013
|
||||
|
||||
# 健康检查配置
|
||||
HEALTHCHECK --interval=30s --timeout=3s \
|
||||
CMD curl -f http://localhost:10013/actuator/health || exit 1
|
||||
|
||||
# 容器启动命令
|
||||
ENTRYPOINT ["sh", "-c", "java ${JAVA_OPTS} -jar ebike-maintenance.jar"]
|
||||
@ -15,6 +15,7 @@
|
||||
|
||||
<properties>
|
||||
<java.version>17</java.version>
|
||||
<docker.image.prefix>cdzy_ebike</docker.image.prefix>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
@ -227,6 +228,24 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>1.2.2</version>
|
||||
<configuration>
|
||||
<!--远程Docker的地址-->
|
||||
<dockerHost>http://192.168.2.226:2375</dockerHost><!--镜像名称,前缀/项目名-->
|
||||
<imageName>${docker.image.prefix}/${project.artifactId}</imageName>
|
||||
<dockerDirectory>src/main/docker</dockerDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<targetPath>/</targetPath>
|
||||
<directory>${project.build.directory}</directory>
|
||||
<include>${project.build.finalName}.jar</include>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
21
ebike-operate/src/main/docker/Dockerfile
Normal file
21
ebike-operate/src/main/docker/Dockerfile
Normal file
@ -0,0 +1,21 @@
|
||||
|
||||
# 使用官方Eclipse Temurin镜像作为基础镜像(JDK17兼容Spring Boot 3.x)
|
||||
FROM eclipse-temurin:17-jdk-jammy
|
||||
|
||||
VOLUME /opt/docker-images
|
||||
|
||||
ADD ebike-operate-0.0.1-SNAPSHOT.jar /ebike-operate.jar
|
||||
|
||||
|
||||
# 设置JVM参数(根据实际需求调整)
|
||||
ENV JAVA_OPTS="-Xms512m -Xmx1024m"
|
||||
|
||||
# 暴露应用端口(与application.yml配置一致)
|
||||
EXPOSE 10014
|
||||
|
||||
# 健康检查配置
|
||||
HEALTHCHECK --interval=30s --timeout=3s \
|
||||
CMD curl -f http://localhost:10014/actuator/health || exit 1
|
||||
|
||||
# 容器启动命令
|
||||
ENTRYPOINT ["sh", "-c", "java ${JAVA_OPTS} -jar ebike-operate.jar"]
|
||||
@ -15,6 +15,7 @@
|
||||
|
||||
<properties>
|
||||
<java.version>17</java.version>
|
||||
<docker.image.prefix>cdzy_ebike</docker.image.prefix>
|
||||
</properties>
|
||||
<dependencies>
|
||||
|
||||
@ -218,6 +219,24 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>1.2.2</version>
|
||||
<configuration>
|
||||
<!--远程Docker的地址-->
|
||||
<dockerHost>http://192.168.2.226:2375</dockerHost><!--镜像名称,前缀/项目名-->
|
||||
<imageName>${docker.image.prefix}/${project.artifactId}</imageName>
|
||||
<dockerDirectory>src/main/docker</dockerDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<targetPath>/</targetPath>
|
||||
<directory>${project.build.directory}</directory>
|
||||
<include>${project.build.finalName}.jar</include>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
21
ebike-orders/src/main/docker/Dockerfile
Normal file
21
ebike-orders/src/main/docker/Dockerfile
Normal file
@ -0,0 +1,21 @@
|
||||
|
||||
# 使用官方Eclipse Temurin镜像作为基础镜像(JDK17兼容Spring Boot 3.x)
|
||||
FROM eclipse-temurin:17-jdk-jammy
|
||||
|
||||
VOLUME /opt/docker-images
|
||||
|
||||
ADD ebike-orders-0.0.1-SNAPSHOT.jar /ebike-orders.jar
|
||||
|
||||
|
||||
# 设置JVM参数(根据实际需求调整)
|
||||
ENV JAVA_OPTS="-Xms512m -Xmx1024m"
|
||||
|
||||
# 暴露应用端口(与application.yml配置一致)
|
||||
EXPOSE 10016
|
||||
|
||||
# 健康检查配置
|
||||
HEALTHCHECK --interval=30s --timeout=3s \
|
||||
CMD curl -f http://localhost:10016/actuator/health || exit 1
|
||||
|
||||
# 容器启动命令
|
||||
ENTRYPOINT ["sh", "-c", "java ${JAVA_OPTS} -jar ebike-orders.jar"]
|
||||
@ -18,6 +18,7 @@
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<docker.image.prefix>cdzy_ebike</docker.image.prefix>
|
||||
</properties>
|
||||
|
||||
|
||||
@ -191,6 +192,24 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>1.2.2</version>
|
||||
<configuration>
|
||||
<!--远程Docker的地址-->
|
||||
<dockerHost>http://192.168.2.226:2375</dockerHost><!--镜像名称,前缀/项目名-->
|
||||
<imageName>${docker.image.prefix}/${project.artifactId}</imageName>
|
||||
<dockerDirectory>src/main/docker</dockerDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<targetPath>/</targetPath>
|
||||
<directory>${project.build.directory}</directory>
|
||||
<include>${project.build.finalName}.jar</include>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
21
ebike-payment/src/main/docker/Dockerfile
Normal file
21
ebike-payment/src/main/docker/Dockerfile
Normal file
@ -0,0 +1,21 @@
|
||||
|
||||
# 使用官方Eclipse Temurin镜像作为基础镜像(JDK17兼容Spring Boot 3.x)
|
||||
FROM eclipse-temurin:17-jdk-jammy
|
||||
|
||||
VOLUME /opt/docker-images
|
||||
|
||||
ADD ebike-payment-0.0.1-SNAPSHOT.jar /ebike-payment.jar
|
||||
|
||||
|
||||
# 设置JVM参数(根据实际需求调整)
|
||||
ENV JAVA_OPTS="-Xms512m -Xmx1024m"
|
||||
|
||||
# 暴露应用端口(与application.yml配置一致)
|
||||
EXPOSE 10017
|
||||
|
||||
# 健康检查配置
|
||||
HEALTHCHECK --interval=30s --timeout=3s \
|
||||
CMD curl -f http://localhost:10017/actuator/health || exit 1
|
||||
|
||||
# 容器启动命令
|
||||
ENTRYPOINT ["sh", "-c", "java ${JAVA_OPTS} -jar ebike-payment.jar"]
|
||||
@ -13,6 +13,11 @@
|
||||
<description>ebike-report</description>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<properties>
|
||||
<java.version>17</java.version>
|
||||
<docker.image.prefix>cdzy_ebike</docker.image.prefix>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
@ -157,6 +162,24 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>1.2.2</version>
|
||||
<configuration>
|
||||
<!--远程Docker的地址-->
|
||||
<dockerHost>http://192.168.2.226:2375</dockerHost><!--镜像名称,前缀/项目名-->
|
||||
<imageName>${docker.image.prefix}/${project.artifactId}</imageName>
|
||||
<dockerDirectory>src/main/docker</dockerDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<targetPath>/</targetPath>
|
||||
<directory>${project.build.directory}</directory>
|
||||
<include>${project.build.finalName}.jar</include>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
21
ebike-report/src/main/docker/Dockerfile
Normal file
21
ebike-report/src/main/docker/Dockerfile
Normal file
@ -0,0 +1,21 @@
|
||||
|
||||
# 使用官方Eclipse Temurin镜像作为基础镜像(JDK17兼容Spring Boot 3.x)
|
||||
FROM eclipse-temurin:17-jdk-jammy
|
||||
|
||||
VOLUME /opt/docker-images
|
||||
|
||||
ADD ebike-report-0.0.1-SNAPSHOT.jar /ebike-report.jar
|
||||
|
||||
|
||||
# 设置JVM参数(根据实际需求调整)
|
||||
ENV JAVA_OPTS="-Xms512m -Xmx1024m"
|
||||
|
||||
# 暴露应用端口(与application.yml配置一致)
|
||||
EXPOSE 10015
|
||||
|
||||
# 健康检查配置
|
||||
HEALTHCHECK --interval=30s --timeout=3s \
|
||||
CMD curl -f http://localhost:10015/actuator/health || exit 1
|
||||
|
||||
# 容器启动命令
|
||||
ENTRYPOINT ["sh", "-c", "java ${JAVA_OPTS} -jar ebike-report.jar"]
|
||||
Loading…
x
Reference in New Issue
Block a user