티스토리 뷰
해당 포스팅은, 간략하게 코드만 작성되어있는 게시물입니다. 좀더 자세한 내용을 원하신다면, 아래의 글을 참조해주세요
https://ggparkitbank.tistory.com/177
이번 시간에는 Gateway Service를 배포하려합니다.
#ecommerce.yml
token:
expiration_time: 864000000
secret: '{cipher}AQAIOA+faH9XEcX5usyT6e+7ahXOvdmcZtZHMHQyDznJQ21eXzGq11eXqWh7F8/zo2xywBQhSmCz3YbyT181IvPhUB9djzSiYyndedY/k1XX/1lr8a1eZ5QRJbQeuAawgPmeZpr2xb+/7egZw2uUZtzSZKS7xZHh9cXV218sAWteTOKP9Y0AzWuz0ZiV7CJhK9OuZvTBShIlF3Hfy1Umxdmy2AwSqNIEndH8RQer17CaI7fF/sdj41v6YECyL39jP5143aaUyxTt/qgw2RDgh9WrDNdH4LwavG4Pl7+9ob5PDcpZekmScPsXFouJTjGYaX4ICTk04FhoOgxt9ZSB0lBdruNTgzdEaDTE519BaF1EY8noii/4mQDDTIfkX/Gz4oZfHcz6JwhDHeHgKFmxRc4v'
gateway:
ip: 172.18.0.5
#pom.xml
<groupId>com.example</groupId>
<artifactId>apigateway-service</artifactId>
<version>1.0</version>
<name>apigateway-service</name>
<description>Demo project for Spring Boot</description>
#Dockerfile
FROM openjdk:17-ea-11-jdk-slim
VOLUME /tmp
COPY target/apigateway-service-1.0.jar ApigatewayService.jar
ENTRYPOINT ["java","-jar","ApigatewayService.jar"]
#JarFile Compile
-먼저 Apigateway Service 폴더로 이동
mvn clean compile package -DskipTests=true
#Dockerfile Build
docker build --tag ggpark0315/apigateway-service:1.0 .
#Dockerfile Push
docker push ggpark0315/apigateway-service:1.0
#Docker Run
docker run -d -p 8000:8000 --network ecommerce-network -e "spring.cloud.config.uri=http://config-service:8888" -e "spring.rabbitmq.host=rabbitmq" -e "eureka.client.serviceUrl.defaultZone=http://discovery-service:8761/eureka/" --name apigateway-service ggpark0315/apigateway-service:1.0
#정상 동작확인
저는 오늘 점심으로 국밥을 먹었습니다.
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- MariaDB
- Feign
- kafka
- Kafka Connect
- LoadBalancer
- docker
- Spring + ELK
- github
- producer
- 루틴기록
- Logstash to ElasticSearch
- springcloud
- 운동일기
- git
- MSA
- ACTUATOR
- elasticSearch
- 오늘저녁 삼겹살
- JWT
- 미래의나에게동기부여
- config
- 빅-오
- rabbitmq
- Logstash 활용
- consumer
- zipkin
- prometheus
- UserService
- Gateway
- 운동
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
글 보관함