Pre Merge pull request !223 from liuhx/master
This commit is contained in:
commit
c35a7df624
|
|
@ -0,0 +1,74 @@
|
|||
kind: Deployment
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
name: ${project.artifactId}
|
||||
namespace: ${env.NAME_SPACE}
|
||||
labels:
|
||||
app: ${project.artifactId}
|
||||
spec:
|
||||
replicas: ${deployment.spec.replicas}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: ${project.artifactId}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: ${project.artifactId}
|
||||
spec:
|
||||
containers:
|
||||
- name: ${project.artifactId}
|
||||
image: '${docker.repository}/${project.artifactId}:${project.version}'
|
||||
ports:
|
||||
- name: http-server
|
||||
containerPort: 9000
|
||||
protocol: TCP
|
||||
- name: job-agent-server
|
||||
containerPort: 9999
|
||||
protocol: TCP
|
||||
env:
|
||||
- name: APP_PORT
|
||||
value: '9000'
|
||||
- name: APP_DEPLOY
|
||||
value: '${env.APP_DEPLOY}'
|
||||
- name: NACOS_SERVER_IP
|
||||
value: 'nacos-server.${env.NAME_SPACE}.${env.DOMAIN_NAME}'
|
||||
- name: NACOS_SERVER_PORT
|
||||
value: '8848'
|
||||
- name: SW_AGENT_NAMESPACE
|
||||
value: ${env.NAME_SPACE}
|
||||
- name: SW_AGENT_NAME
|
||||
value: ${project.artifactId}
|
||||
- name: SW_AGENT_COLLECTOR_BACKEND_SERVICES
|
||||
value: ${env.NAME_SPACE}-skywalk-skywalking-oap.${env.NAME_SPACE}.${env.DOMAIN_NAME}:11800
|
||||
- name: SW_GRPC_LOG_SERVER_HOST
|
||||
value: ${env.NAME_SPACE}-skywalk-skywalking-oap.${env.NAME_SPACE}.${env.DOMAIN_NAME}
|
||||
- name: SW_GRPC_LOG_SERVER_PORT
|
||||
value: '11800'
|
||||
- name: JAVA_OPTS
|
||||
value: '-server -javaagent:/opt/agent/skywalking-agent.jar -XX:+UseContainerSupport -XX:InitialRAMPercentage=85.0 -XX:MaxRAMPercentage=85.0'
|
||||
resources:
|
||||
limits:
|
||||
cpu: '2'
|
||||
memory: 4Gi
|
||||
requests:
|
||||
cpu: '50m'
|
||||
memory: 512Mi
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: 9000
|
||||
initialDelaySeconds: 60
|
||||
timeoutSeconds: 1
|
||||
periodSeconds: 20
|
||||
successThreshold: 1
|
||||
failureThreshold: 3
|
||||
readinessProbe:
|
||||
tcpSocket:
|
||||
port: 9000
|
||||
initialDelaySeconds: 60
|
||||
timeoutSeconds: 1
|
||||
periodSeconds: 20
|
||||
successThreshold: 1
|
||||
failureThreshold: 3
|
||||
imagePullPolicy: Always
|
||||
imagePullSecrets:
|
||||
- name: ruoyi-harbor-secret
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER ruoyi
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/ruoyi
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/ruoyi
|
||||
# 指定路径
|
||||
WORKDIR /home/ruoyi
|
||||
|
||||
# 复制jar文件到路径
|
||||
COPY ${JAR_FILE} /home/ruoyi/app.jar
|
||||
|
||||
# 启动文件服务
|
||||
ENTRYPOINT java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /home/ruoyi/app.jar
|
||||
18
pom.xml
18
pom.xml
|
|
@ -38,6 +38,8 @@
|
|||
<poi.version>4.1.2</poi.version>
|
||||
<commons-collections.version>3.2.2</commons-collections.version>
|
||||
<transmittable-thread-local.version>2.13.2</transmittable-thread-local.version>
|
||||
<docker.repository>repository</docker.repository>
|
||||
<docker.build.skip>true</docker.build.skip>
|
||||
</properties>
|
||||
|
||||
<!-- 依赖声明 -->
|
||||
|
|
@ -263,6 +265,22 @@
|
|||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<version>1.4.13</version>
|
||||
<artifactId>dockerfile-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<noCache>true</noCache>
|
||||
<skip>${docker.build.skip}</skip>
|
||||
<readTimeoutMillis>5000</readTimeoutMillis>
|
||||
<connectTimeoutMillis>5000</connectTimeoutMillis>
|
||||
<googleContainerRegistryEnabled>false</googleContainerRegistryEnabled>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
|
||||
<repositories>
|
||||
|
|
|
|||
|
|
@ -13,6 +13,10 @@
|
|||
<description>
|
||||
ruoyi-auth认证授权中心
|
||||
</description>
|
||||
|
||||
<properties>
|
||||
<docker.build.skip>false</docker.build.skip>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
|
|
@ -57,6 +61,32 @@
|
|||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-docker-resources</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>target</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>../</directory>
|
||||
<includes>
|
||||
<include>Dockerfile</include>
|
||||
<include>Deployment.yml</include>
|
||||
</includes>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
|
|
@ -68,6 +98,19 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>dockerfile-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<dockerfile>${project.basedir}/target/Dockerfile</dockerfile>
|
||||
<tag>${project.version}</tag>
|
||||
<repository>${docker.repository}/${project.artifactId}</repository>
|
||||
<contextDirectory>${project.basedir}/target</contextDirectory>
|
||||
<buildArgs>
|
||||
<JAR_FILE>${project.build.finalName}.jar</JAR_FILE>
|
||||
</buildArgs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,10 @@
|
|||
ruoyi-gateway网关模块
|
||||
</description>
|
||||
|
||||
<properties>
|
||||
<docker.build.skip>false</docker.build.skip>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- SpringCloud Gateway -->
|
||||
|
|
@ -93,6 +97,32 @@
|
|||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-docker-resources</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>target</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>../</directory>
|
||||
<includes>
|
||||
<include>Dockerfile</include>
|
||||
<include>Deployment.yml</include>
|
||||
</includes>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
|
|
@ -104,6 +134,19 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>dockerfile-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<dockerfile>${project.basedir}/target/Dockerfile</dockerfile>
|
||||
<tag>${project.version}</tag>
|
||||
<repository>${docker.repository}/${project.artifactId}</repository>
|
||||
<contextDirectory>${project.basedir}/target</contextDirectory>
|
||||
<buildArgs>
|
||||
<JAR_FILE>${project.build.finalName}.jar</JAR_FILE>
|
||||
</buildArgs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
|
|
|||
|
|
@ -22,4 +22,6 @@
|
|||
ruoyi-modules业务模块
|
||||
</description>
|
||||
|
||||
|
||||
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -15,6 +15,10 @@
|
|||
ruoyi-modules-file文件服务
|
||||
</description>
|
||||
|
||||
<properties>
|
||||
<docker.build.skip>false</docker.build.skip>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- SpringCloud Alibaba Nacos -->
|
||||
|
|
@ -71,6 +75,32 @@
|
|||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-docker-resources</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>target</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>../../</directory>
|
||||
<includes>
|
||||
<include>Dockerfile</include>
|
||||
<include>Deployment.yml</include>
|
||||
</includes>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
|
|
@ -82,6 +112,19 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>dockerfile-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<dockerfile>${project.basedir}/target/Dockerfile</dockerfile>
|
||||
<tag>${project.version}</tag>
|
||||
<repository>${docker.repository}/${project.artifactId}</repository>
|
||||
<contextDirectory>${project.basedir}/target</contextDirectory>
|
||||
<buildArgs>
|
||||
<JAR_FILE>${project.build.finalName}.jar</JAR_FILE>
|
||||
</buildArgs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
|
|
|||
|
|
@ -15,6 +15,10 @@
|
|||
ruoyi-modules-gen代码生成
|
||||
</description>
|
||||
|
||||
<properties>
|
||||
<docker.build.skip>false</docker.build.skip>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- SpringCloud Alibaba Nacos -->
|
||||
|
|
@ -83,6 +87,32 @@
|
|||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-docker-resources</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>target</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>../../</directory>
|
||||
<includes>
|
||||
<include>Dockerfile</include>
|
||||
<include>Deployment.yml</include>
|
||||
</includes>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
|
|
@ -94,6 +124,19 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>dockerfile-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<dockerfile>${project.basedir}/target/Dockerfile</dockerfile>
|
||||
<tag>${project.version}</tag>
|
||||
<repository>${docker.repository}/${project.artifactId}</repository>
|
||||
<contextDirectory>${project.basedir}/target</contextDirectory>
|
||||
<buildArgs>
|
||||
<JAR_FILE>${project.build.finalName}.jar</JAR_FILE>
|
||||
</buildArgs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
|
|
|||
|
|
@ -15,6 +15,10 @@
|
|||
ruoyi-modules-job定时任务
|
||||
</description>
|
||||
|
||||
<properties>
|
||||
<docker.build.skip>false</docker.build.skip>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- SpringCloud Alibaba Nacos -->
|
||||
|
|
@ -83,6 +87,32 @@
|
|||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-docker-resources</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>target</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>../../</directory>
|
||||
<includes>
|
||||
<include>Dockerfile</include>
|
||||
<include>Deployment.yml</include>
|
||||
</includes>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
|
|
@ -94,6 +124,19 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>dockerfile-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<dockerfile>${project.basedir}/target/Dockerfile</dockerfile>
|
||||
<tag>${project.version}</tag>
|
||||
<repository>${docker.repository}/${project.artifactId}</repository>
|
||||
<contextDirectory>${project.basedir}/target</contextDirectory>
|
||||
<buildArgs>
|
||||
<JAR_FILE>${project.build.finalName}.jar</JAR_FILE>
|
||||
</buildArgs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,11 @@
|
|||
<description>
|
||||
ruoyi-modules-system系统模块
|
||||
</description>
|
||||
|
||||
|
||||
<properties>
|
||||
<docker.build.skip>false</docker.build.skip>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- SpringCloud Alibaba Nacos -->
|
||||
|
|
@ -83,6 +87,32 @@
|
|||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-docker-resources</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>target</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>../../</directory>
|
||||
<includes>
|
||||
<include>Dockerfile</include>
|
||||
<include>Deployment.yml</include>
|
||||
</includes>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
|
|
@ -94,6 +124,19 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>dockerfile-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<dockerfile>${project.basedir}/target/Dockerfile</dockerfile>
|
||||
<tag>${project.version}</tag>
|
||||
<repository>${docker.repository}/${project.artifactId}</repository>
|
||||
<contextDirectory>${project.basedir}/target</contextDirectory>
|
||||
<buildArgs>
|
||||
<JAR_FILE>${project.build.finalName}.jar</JAR_FILE>
|
||||
</buildArgs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue