Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
publicCloud
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张子昊
publicCloud
Commits
816244b0
Commit
816244b0
authored
Apr 01, 2025
by
张子昊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加DockerFile
parent
4f8a3d2a
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
2 deletions
+35
-2
eureka-server/Dockerfile
+15
-0
eureka-server/pom.xml
+1
-0
gateway/Dockerfile
+15
-0
gateway/pom.xml
+1
-0
gateway/src/main/resources/application.yml
+3
-2
No files found.
eureka-server/Dockerfile
0 → 100644
View file @
816244b0
FROM
artifact.srdcloud.cn/public-docker-virtual/openjdk:8-jdk
RUN
mkdir
-p
/app
WORKDIR
/app
EXPOSE
7001
ENV
TZ=Asia/Shanghai
RUN
ln
-snf
/usr/share/zoneinfo/
$TZ
/etc/localtime
&&
echo
$TZ
>
/etc/timezone
ADD
./target/eureka-server-1.0.jar ./app.jar
ENTRYPOINT
["java", "-jar", "app.jar"]
eureka-server/pom.xml
View file @
816244b0
...
...
@@ -10,6 +10,7 @@
</parent>
<artifactId>
eureka-server
</artifactId>
<version>
1.0
</version>
<dependencies>
...
...
gateway/Dockerfile
0 → 100644
View file @
816244b0
FROM
artifact.srdcloud.cn/public-docker-virtual/openjdk:8-jdk
RUN
mkdir
-p
/app
WORKDIR
/app
EXPOSE
9998
ENV
TZ=Asia/Shanghai
RUN
ln
-snf
/usr/share/zoneinfo/
$TZ
/etc/localtime
&&
echo
$TZ
>
/etc/timezone
ADD
./target/gateway-1.0.jar ./app.jar
ENTRYPOINT
["java", "-jar", "app.jar"]
gateway/pom.xml
View file @
816244b0
...
...
@@ -10,6 +10,7 @@
</parent>
<artifactId>
gateway
</artifactId>
<version>
1.0
</version>
<dependencies>
<dependency>
...
...
gateway/src/main/resources/application.yml
View file @
816244b0
...
...
@@ -16,7 +16,7 @@ spring:
# 开启从注册中心动态创建路由的功能,利用微服务进行路由
enabled
:
true
# 使用小写服务名,只能大写或小写,两者无法通过此配置兼容
lower-case-service-id
:
true
#
lower-case-service-id: true
eureka
:
server
:
...
...
@@ -27,7 +27,7 @@ eureka:
hostname
:
localhost
client
:
# 作为公共gateway,自身不注册,仅提供对外转发
# register-with-eureka: tru
e
register-with-eureka
:
fals
e
fetch-registry
:
true
service-url
:
defaultZone
:
http://${spring.security.user.name}:${spring.security.user.password}@${eureka.server.target}/eureka
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment