Skip to content

Commit e5ffd8f

Browse files
authored
Merge pull request #16 from kgu-clab/environment/#15
environment: CI/CD 자동화 설정 완료
2 parents 94612d4 + dcf8a61 commit e5ffd8f

File tree

7 files changed

+993
-13
lines changed

7 files changed

+993
-13
lines changed

build.gradle

+6
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ dependencies {
4040
implementation 'com.google.code.gson:gson:2.11.0' // JSON 라이브러리
4141
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.5.0'
4242

43+
// Monitoring
44+
implementation 'org.springframework.boot:spring-boot-starter-actuator' // Spring Boot Actuator
45+
implementation 'io.micrometer:micrometer-registry-prometheus' // Prometheus
46+
implementation 'ch.qos.logback:logback-classic:1.5.6' // Logback
47+
implementation 'ch.qos.logback:logback-core:1.5.6' // Logback
48+
4349
// DB
4450
implementation 'com.mysql:mysql-connector-j:9.0.0' // MySQL JDBC Driver
4551
implementation 'org.springframework.boot:spring-boot-starter-data-jpa' // Spring Data JPA

jenkins/prod/Dockerfile

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Use the official OpenJDK 21 image from the Docker Hub
2+
FROM openjdk:21-jdk
3+
4+
# Expose port 8080 to the outside world
5+
EXPOSE 8080
6+
7+
# Copy the JAR file into the container
8+
COPY build/libs/time.jar /time.jar
9+
10+
# Set the default active profile to 'stage'. Modify the 'spring.profiles.active' property to match your environment.
11+
# For example, use '-Dspring.profiles.active=production' for production environment.
12+
ENTRYPOINT ["java", "-jar", "-Dspring.profiles.active=prod", "/time.jar"]

0 commit comments

Comments
 (0)