Explorar el Código

컨테이너 실행 스크립트 추가

hyojungkim hace 5 años
padre
commit
27ee813f70

+ 3 - 0
container_execute_scripts/apigateway-start.sh

@@ -0,0 +1,3 @@
+docker run --rm -p 8080:8080 -d -e EUREKA=http://192.168.99.100:8761/eureka,http://192.168.0.43:8761/eureka -e ZIPKIN=http://192.168.0.47:9411 --name gateway spring-cloud-gateway
+#EUREKA 유레카 서버가 실행되는 위치
+#ZIPKIN zipkin이 실행되는 위치

+ 3 - 0
container_execute_scripts/eureka-server-start.sh

@@ -0,0 +1,3 @@
+docker run --rm -p 8761:8761 -d -e EUREKA=http://192.168.99.100:8761/eureka,http://192.168.0.43:8761/eureka --name eureka eureka-server
+#ex) ./eureka-server-start.sh
+#EUREKA : 유레카 서버가 실행되고 있는 위치

+ 11 - 0
container_execute_scripts/icd-search-start-linux.sh

@@ -0,0 +1,11 @@
+docker run --rm -p $1:8080 -e EUREKA=http://192.168.0.31:18761/eureka,http://192.168.0.43:8761/eureka -e HOSTIP=$(ip -4 addr show wlp3s0 | grep -Po 'inet \K[\d.]+') -e PORT=$1 -e ZIPKIN=http://192.168.0.47:9411 icd-search
+
+#ex) ./icd-search-start-linux.sh 8081
+#EUREKA : 유레카 서버가 실행되고 있는 위치
+#HOSTIP : 현재 호스트 컴퓨터 ip
+#PORT : 서비스가 실행될 포트번호
+#ZIPKIN : zipkin이 실행되고있는 위치
+
+#grep options
+#  -P : perl regex
+#  -o : only match

+ 4 - 0
container_execute_scripts/icd-search-start.sh

@@ -0,0 +1,4 @@
+docker run --rm -d -p $1:8080 -e EUREKA=http://192.168.99.100:8761/eureka,http://192.168.0.43:8761/eureka -e HOSTIP=$2 -e PORT=$1 -e ZIPKIN=http://192.168.0.47:9411 icd-search
+#ex) ./icd-search-start.sh 8081 192.168.0.##
+#EUREKA 유레카 서버가 실행되고 있는 위치
+#HOST 현재 호스트 컴퓨터 ip

+ 1 - 0
readme.md

@@ -9,6 +9,7 @@ eurekaserver : 유레카 서버 프로젝트
 - eurekaclient : 유레카 클라이언트 테스트용 프로젝트
 
 컨테이너 실행 스크립트
+container_execute_scripts에 쉘 스크립트로 만들어둠
 
 1.유레카 서버