From ddc033f86134b2347ef71badd294a098f051861f Mon Sep 17 00:00:00 2001
From: "review512jwy@163.com" <“review512jwy@163.com”>
Date: Sun, 8 Mar 2026 21:39:53 +0800
Subject: [PATCH] dockerfile
---
Dockerfile | 20 ++++++++++++
pom.xml | 32 +++++++++++++++++--
src/main/resources/application-dev.properties | 8 +++++
src/main/resources/application-prd.properties | 8 +++++
src/main/resources/application.properties | 16 ++++++----
5 files changed, 74 insertions(+), 10 deletions(-)
create mode 100644 Dockerfile
create mode 100644 src/main/resources/application-dev.properties
create mode 100644 src/main/resources/application-prd.properties
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..2e213f3
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,20 @@
+# FROM registry.ap-northeast-1.aliyuncs.com/southwave/jdk17-template:latest
+FROM amazoncorretto:17-alpine
+# 安装 fontconfig 和 DejaVu 字体 (这是一个通用且免费的字体包)
+RUN apk --no-cache upgrade && \
+ apk --no-cache add fontconfig ttf-dejavu
+
+WORKDIR /app
+COPY target/aeon-tcp.jar app.jar
+EXPOSE 8200
+
+# 使用UseCGroupMemoryLimitForHeap
+
+# ENV JAVA_OPTS="-Xms5g -Xmx5g -XX:+UseParallelGC -XX:ParallelGCThreads=4 -XX:MaxGCPauseMillis=200 -XX:GCTimeRatio=19 -XX:NewRatio=3 -XX:+AlwaysPreTouch -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:/app/gc.log"
+
+# 使用shell方式的ENTRYPOINT来确保环境变量被展开
+ENTRYPOINT java $JAVA_OPTS -jar app.jar -Djavax.net.debug=ssl --spring-profiles=$env
+
+
+
+
diff --git a/pom.xml b/pom.xml
index 70ae80b..a03f1ef 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,6 +28,10 @@
17
+ 126588786019.dkr.ecr.ap-northeast-1.amazonaws.com
+ 382934810846.dkr.ecr.ap-northeast-1.amazonaws.com
+ f10-tcp-gateway
+ f10-tcp-gateway-stg
@@ -81,25 +85,47 @@
+ aeon-tcp
org.springframework.boot
spring-boot-maven-plugin
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
io.fabric8
docker-maven-plugin
0.38.1
- AKIAQNYBBSGDVT3VF4ON
- DEhPMTHAIsKK7L2klURQrmMe3r2Tqgbaa6z2FYQu
+ AKIAVSKFRQDPNWHJDSHL
+ DqGyOiVFKI50/Ix+cjvj25vPL2tC7NJrJ7fqzn/g
${aws.ecr.registryTest}/aeon/${aws.ecr.repositoryTest}:latest
- ${aws.ecr.registry}
+ ${aws.ecr.registryTest}
${project.basedir}/Dockerfile
diff --git a/src/main/resources/application-dev.properties b/src/main/resources/application-dev.properties
new file mode 100644
index 0000000..7455ab7
--- /dev/null
+++ b/src/main/resources/application-dev.properties
@@ -0,0 +1,8 @@
+gateway.tcp.port = 18084
+
+spring.data.redis.host=r-uf63x4g5p6ir5xao87pd.redis.rds.aliyuncs.com
+spring.data.redis.port=6379
+spring.data.redis.password=B2BGn4gK4htgkEwP
+spring.data.redis.database=0
+
+redis.stream.operation.batch-size=500
\ No newline at end of file
diff --git a/src/main/resources/application-prd.properties b/src/main/resources/application-prd.properties
new file mode 100644
index 0000000..993f633
--- /dev/null
+++ b/src/main/resources/application-prd.properties
@@ -0,0 +1,8 @@
+gateway.tcp.port = ${gatewayTcpPort}
+
+spring.data.redis.host=${redisHost}
+spring.data.redis.port=${redisPort}
+spring.data.redis.password=${redisPassword}
+spring.data.redis.database=${redisDatabase}
+
+redis.stream.operation.batch-size=${redisStreamOperationBatchSize}
\ No newline at end of file
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index 5a77399..8034104 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -1,11 +1,13 @@
spring.application.name=aeon_tcp
server.port=30004
-gateway.tcp.port = 18084
+spring.profiles.active=${env:dev}
-spring.data.redis.host=r-uf63x4g5p6ir5xao87pd.redis.rds.aliyuncs.com
-spring.data.redis.port=6379
-spring.data.redis.password=B2BGn4gK4htgkEwP
-spring.data.redis.database=0
-
-redis.stream.operation.batch-size=500
\ No newline at end of file
+#gateway.tcp.port = 18084
+#
+#spring.data.redis.host=r-uf63x4g5p6ir5xao87pd.redis.rds.aliyuncs.com
+#spring.data.redis.port=6379
+#spring.data.redis.password=B2BGn4gK4htgkEwP
+#spring.data.redis.database=0
+#
+#redis.stream.operation.batch-size=500
\ No newline at end of file