Commit 816244b0 by 张子昊

添加DockerFile

parent 4f8a3d2a
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"]
......@@ -10,6 +10,7 @@
</parent>
<artifactId>eureka-server</artifactId>
<version>1.0</version>
<dependencies>
......
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"]
......@@ -10,6 +10,7 @@
</parent>
<artifactId>gateway</artifactId>
<version>1.0</version>
<dependencies>
<dependency>
......
......@@ -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: true
register-with-eureka: false
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment