mirror of
https://gitee.com/youlaitech/youlai-mall.git
synced 2024-12-23 13:03:43 +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
|
ADD target/${JAR_FILE} app.jar
|
||||||
EXPOSE 9999
|
EXPOSE 9999
|
||||||
ENTRYPOINT ["java","-jar","/app.jar"]
|
ENTRYPOINT ["java","-jar","/app.jar"]
|
||||||
|
|
||||||
|
@ -63,6 +63,7 @@
|
|||||||
<youlai.version>1.0.0-SNAPSHOT</youlai.version>
|
<youlai.version>1.0.0-SNAPSHOT</youlai.version>
|
||||||
<dockerfile-maven-version>1.4.13</dockerfile-maven-version>
|
<dockerfile-maven-version>1.4.13</dockerfile-maven-version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
@ -80,12 +81,27 @@
|
|||||||
</executions>
|
</executions>
|
||||||
<configuration>
|
<configuration>
|
||||||
<repository>${project.artifactId}</repository>
|
<repository>${project.artifactId}</repository>
|
||||||
<tag>${project.version}</tag>
|
<tag>latest</tag>
|
||||||
<buildArgs>
|
<buildArgs>
|
||||||
<JAR_FILE>${project.build.finalName}.jar</JAR_FILE>
|
<JAR_FILE>${project.build.finalName}.jar</JAR_FILE>
|
||||||
</buildArgs>
|
</buildArgs>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</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>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</project>
|
</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:
|
spring:
|
||||||
main:
|
profiles:
|
||||||
allow-bean-definition-overriding: true
|
active: prod
|
||||||
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
|
|
||||||
|
Loading…
Reference in New Issue
Block a user