mirror of
https://gitee.com/youlaitech/youlai-mall.git
synced 2024-12-23 05:00:25 +08:00
feat:dockerfile构建镜像
This commit is contained in:
parent
7302bb3626
commit
3bf0ec8cae
@ -4,4 +4,3 @@ ARG JAR_FILE
|
||||
ADD target/${JAR_FILE} app.jar
|
||||
EXPOSE 9999
|
||||
ENTRYPOINT ["java","-jar","/app.jar"]
|
||||
|
||||
|
@ -63,6 +63,7 @@
|
||||
<youlai.version>1.0.0-SNAPSHOT</youlai.version>
|
||||
<dockerfile-maven-version>1.4.13</dockerfile-maven-version>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
@ -80,12 +81,27 @@
|
||||
</executions>
|
||||
<configuration>
|
||||
<repository>${project.artifactId}</repository>
|
||||
<tag>${project.version}</tag>
|
||||
<tag>latest</tag>
|
||||
<buildArgs>
|
||||
<JAR_FILE>${project.build.finalName}.jar</JAR_FILE>
|
||||
</buildArgs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<includeSystemScope>true</includeSystemScope>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
32
youlai-gateway/src/main/resources/bootstrap-dev.yml
Normal file
32
youlai-gateway/src/main/resources/bootstrap-dev.yml
Normal file
@ -0,0 +1,32 @@
|
||||
server:
|
||||
port: 9999
|
||||
|
||||
spring:
|
||||
main:
|
||||
allow-bean-definition-overriding: true
|
||||
application:
|
||||
name: youlai-gateway
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: http://localhost:8848
|
||||
config:
|
||||
# docker启动nacos-server需要配置
|
||||
server-addr: ${spring.cloud.nacos.discovery.server-addr}
|
||||
file-extension: yaml
|
||||
|
||||
# 全局参数设置
|
||||
ribbon:
|
||||
ReadTimeout: 120000
|
||||
ConnectTimeout: 10000
|
||||
SocketTimeout: 10000
|
||||
MaxAutoRetries: 0
|
||||
MaxAutoRetriesNextServer: 1
|
||||
|
||||
hystrix:
|
||||
command:
|
||||
default:
|
||||
execution:
|
||||
isolation:
|
||||
thread:
|
||||
timeoutInMilliseconds: 40000
|
15
youlai-gateway/src/main/resources/bootstrap-prod.yml
Normal file
15
youlai-gateway/src/main/resources/bootstrap-prod.yml
Normal file
@ -0,0 +1,15 @@
|
||||
server:
|
||||
port: 9999
|
||||
|
||||
spring:
|
||||
main:
|
||||
allow-bean-definition-overriding: true
|
||||
application:
|
||||
name: youlai-gateway
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: http://c.youlai.store:8848
|
||||
config:
|
||||
server-addr: ${spring.cloud.nacos.discovery.server-addr}
|
||||
file-extension: yaml
|
@ -1,32 +1,3 @@
|
||||
server:
|
||||
port: 9999
|
||||
|
||||
spring:
|
||||
main:
|
||||
allow-bean-definition-overriding: true
|
||||
application:
|
||||
name: youlai-gateway
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: http://localhost:8848
|
||||
config:
|
||||
# docker启动nacos-server需要配置
|
||||
server-addr: ${spring.cloud.nacos.discovery.server-addr}
|
||||
file-extension: yaml
|
||||
|
||||
# 全局参数设置
|
||||
ribbon:
|
||||
ReadTimeout: 120000
|
||||
ConnectTimeout: 10000
|
||||
SocketTimeout: 10000
|
||||
MaxAutoRetries: 0
|
||||
MaxAutoRetriesNextServer: 1
|
||||
|
||||
hystrix:
|
||||
command:
|
||||
default:
|
||||
execution:
|
||||
isolation:
|
||||
thread:
|
||||
timeoutInMilliseconds: 40000
|
||||
profiles:
|
||||
active: prod
|
||||
|
Loading…
Reference in New Issue
Block a user