DockerFile
FROM openjdk:11.0.10-jre-slim-buster
WORKDIR /home/user
# jar파일 복제
COPY point-service-0.0.1-SNAPSHOT.jar /home/user
# jar파일 실행
CMD java -jar /home/user/point-service-0.0.1-SNAPSHOT.jar
필요 종속 서비스
MySQL8
Apache Kafka
젠킨스 아이템 설정

Docker 컨테이너 생성 및 실행 커맨드
sudo docker build -t point .
sudo docker run -p 8014:8014 -d --name PointService --network nextnovel point
추가 설정
server:
port: 8014
logging:
level:
web: debug
sql: debug
spring:
profiles:
active: service_payment
eureka:
client:
register-with-eureka: true
fetch-registry: true
service-url:
defaultZone: http://k8a509.p.ssafy.io:8761/eureka
boot-pay:
rest-api-key: 643432073049c8001d7d10ac
private-key: D6+wqdBeprLC6I2LwR42iG/YHMIHjwaynDkkjSmLHYo=
---
spring:
application:
name: point_service
config:
activate:
on-profile: dev
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/point?serverTimezone=Asia/Seoul&characterEncoding=UTF-8
username: root
password: root
jpa:
show-sql: false
properties:
hibernate:
format_sql: true
database: mysql
hibernate:
ddl-auto: create
kafka:
bootstrap-servers: localhost:9092
consumer:
group-id: order
kafka-config:
datasource: localhost:9092
---
spring:
application:
name: point_service
config:
activate:
on-profile: service_payment
main:
allow-bean-definition-overriding: true
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://k8a509.p.ssafy.io:3306/point?serverTimezone=Asia/Seoul&characterEncoding=UTF-8
username: root
password: audrbekd
jpa:
show-sql: false
properties:
hibernate:
format_sql: true
database: mysql
hibernate:
ddl-auto: validate
kafka:
bootstrap-servers: kafka:9092
consumer:
group-id: order
kafka-config:
datasource: kafka:9092