1. 新增docker 部署配置

This commit is contained in:
wangiegie@gmail.com 2017-12-24 17:03:01 +08:00
parent 5e806e9a24
commit 671d378253
14 changed files with 96 additions and 5 deletions

View File

@ -0,0 +1,5 @@
FROM java:8-jre
MAINTAINER Pig lengleng <wangiegie@gmail.com>
ADD ./jar/pig-admin-service.jar /app/
CMD ["java", "-Xmx200m", "-jar", "/app/pig-admin-service.jar"]

View File

@ -0,0 +1,5 @@
FROM java:8-jre
MAINTAINER Pig lengleng <wangiegie@gmail.com>
ADD ./jar/pig-auth-service.jar /app/
CMD ["java", "-Xmx200m", "-jar", "/app/pig-auth-service.jar"]

View File

@ -0,0 +1,7 @@
FROM java:8-jre
MAINTAINER Pig lengleng <wangiegie@gmail.com>
ADD ./jar/pig-config.jar /app/
CMD ["java", "-Xmx200m", "-jar", "/app/pig-config.jar"]
EXPOSE 4001

View File

@ -1,7 +1,7 @@
FROM java:8-jre
MAINTAINER Pig lengleng <wangiegie@gmail.com>
ADD ./target/pig-eureka.jar /app/
ADD ./jar/pig-eureka.jar /app/
CMD ["java", "-Xmx200m", "-jar", "/app/pig-eureka.jar"]
EXPOSE 1025

View File

@ -0,0 +1,7 @@
FROM java:8-jre
MAINTAINER Pig lengleng <wangiegie@gmail.com>
ADD ./jar/pig-gateway.jar /app/
CMD ["java", "-Xmx200m", "-jar", "/app/pig-gateway.jar"]
EXPOSE 9999

View File

@ -0,0 +1,55 @@
version: '2'
services:
pig-eureka:
build:
context: ./
dockerfile: Dockerfile-eureka
restart: always
ports:
- 59025:1025
logging:
options:
max-size: "10m"
max-file: "10"
pig-config:
build:
context: ./
dockerfile: Dockerfile-config
restart: always
logging:
options:
max-size: "10m"
max-file: "10"
pig-gateway:
build:
context: ./
dockerfile: Dockerfile-gateway
restart: always
ports:
- 59999:9999
logging:
options:
max-size: "10m"
max-file: "10"
pig-auth-service:
build:
context: ./
dockerfile: Dockerfile-auth
restart: always
logging:
options:
max-size: "10m"
max-file: "10"
pig-admin-service:
build:
context: ./
dockerfile: Dockerfile-admin
restart: always
logging:
options:
max-size: "10m"
max-file: "10"

View File

@ -76,6 +76,9 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<finalName>${project.name}</finalName>
</configuration>
</plugin>
</plugins>
</build>

View File

@ -3,7 +3,7 @@ eureka:
prefer-ip-address: true
client:
serviceUrl:
defaultZone: http://pig:gip6666@localhost:1025/eureka
defaultZone: http://pig:gip6666@pig-eureka:1025/eureka
spring:
application:

View File

@ -39,6 +39,9 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<finalName>${project.name}</finalName>
</configuration>
</plugin>
</plugins>
</build>

View File

@ -3,7 +3,7 @@ eureka:
prefer-ip-address: true
client:
serviceUrl:
defaultZone: http://pig:gip6666@localhost:1025/eureka
defaultZone: http://pig:gip6666@pig-eureka:1025/eureka
spring:
application:

View File

@ -30,6 +30,9 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<finalName>${project.name}</finalName>
</configuration>
</plugin>
</plugins>
</build>

View File

@ -18,4 +18,4 @@ eureka:
prefer-ip-address: true
client:
serviceUrl:
defaultZone: http://pig:gip6666@localhost:1025/eureka
defaultZone: http://pig:gip6666@pig-eureka:1025/eureka

View File

@ -61,6 +61,9 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<finalName>${project.name}</finalName>
</configuration>
</plugin>
</plugins>
</build>

View File

@ -3,7 +3,7 @@ eureka:
prefer-ip-address: true
client:
serviceUrl:
defaultZone: http://pig:gip6666@localhost:1025/eureka
defaultZone: http://pig:gip6666@pig-eureka:1025/eureka
spring:
application: