-
Notifications
You must be signed in to change notification settings - Fork 2
M4 환경 구성을 위한 Docker 설정 및 Makefile 추가 #266 #267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from all commits
69656a3
2f92b52
f389eb4
e73eae3
b1d6029
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,37 +2,40 @@ | |
| <configuration packagingData="true"> | ||
| <timestamp key="timestamp" datePattern="yyyy-MM-dd-HH-mm-ssSSS"/> | ||
|
|
||
| <appender name="aws_cloud_watch_log" class="ca.pjer.logback.AwsLogsAppender"> | ||
| <layout> | ||
| <pattern>[%thread] [%date] [%level] [%file:%line] - %msg%n</pattern> | ||
| </layout> | ||
| <logGroupName>kickzo-logs</logGroupName> | ||
| <logStreamUuidPrefix>kickzo-log</logStreamUuidPrefix> | ||
| <logRegion>ap-northeast-1</logRegion> | ||
| <maxBatchLogEvents>50</maxBatchLogEvents> | ||
| <maxFlushTimeMillis>30000</maxFlushTimeMillis> | ||
| <maxBlockTimeMillis>5000</maxBlockTimeMillis> | ||
| <retentionTimeDays>0</retentionTimeDays> | ||
| <accessKeyId>${AWS_ACCESS_KEY}</accessKeyId> | ||
| <secretAccessKey>${AWS_SECRET_KEY}</secretAccessKey> | ||
| </appender> | ||
|
|
||
| <property name="CONSOLE_LOG_PATTERN" value="%highlight(%-5level) %date [%thread] %cyan([%C{0} :: %M :: %L]) - %msg%n"/> | ||
| <appender name="console_log" class="ch.qos.logback.core.ConsoleAppender"> | ||
| <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> | ||
| <pattern>${CONSOLE_LOG_PATTERN}</pattern> | ||
| </encoder> | ||
| </appender> | ||
|
|
||
| <springProfile name="dev"> | ||
| <root level="INFO"> | ||
| <!-- AWS CloudWatch 설정은 prod 프로필에서만 사용 --> | ||
| <springProfile name="prod"> | ||
| <appender name="aws_cloud_watch_log" class="ca.pjer.logback.AwsLogsAppender"> | ||
| <layout> | ||
| <pattern>[%thread] [%date] [%level] [%file:%line] - %msg%n</pattern> | ||
| </layout> | ||
| <logGroupName>kickzo-logs</logGroupName> | ||
| <logStreamUuidPrefix>kickzo-log</logStreamUuidPrefix> | ||
| <logRegion>ap-northeast-1</logRegion> | ||
| <maxBatchLogEvents>50</maxBatchLogEvents> | ||
| <maxFlushTimeMillis>30000</maxFlushTimeMillis> | ||
| <maxBlockTimeMillis>5000</maxBlockTimeMillis> | ||
| <retentionTimeDays>0</retentionTimeDays> | ||
| <accessKeyId>${AWS_ACCESS_KEY}</accessKeyId> | ||
| <secretAccessKey>${AWS_SECRET_KEY}</secretAccessKey> | ||
| </appender> | ||
|
|
||
| <root level="WARN"> | ||
| <appender-ref ref="aws_cloud_watch_log"/> | ||
| <appender-ref ref="console_log"/> | ||
| </root> | ||
| </springProfile> | ||
|
|
||
| <springProfile name="docker"> | ||
| <root level="WARN"> | ||
| <appender-ref ref="aws_cloud_watch_log"/> | ||
| <!-- 개발 환경(dev, docker)에서는 콘솔 로깅만 사용 --> | ||
| <springProfile name="dev,docker,default"> | ||
| <root level="INFO"> | ||
| <appender-ref ref="console_log"/> | ||
| </root> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. prod 환경이랑 개발 환경이랑 나누는 방법 좋은데요!?! 이렇게 바꾸면 매번 파일 들어가서 수정할 일이 없을 것 같네요! 감사합니다 :) |
||
| </springProfile> | ||
| </configuration> | ||
| </configuration> | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -16,24 +16,34 @@ services: | |||||
| volumes: | ||||||
| - es-data:/usr/share/elasticsearch/data | ||||||
| - ./elasticsearch-init.sh:/usr/share/elasticsearch/init.sh | ||||||
| entrypoint: [ "/bin/sh", "-c", "/usr/share/elasticsearch/init.sh & /usr/local/bin/docker-entrypoint.sh" ] | ||||||
| entrypoint: | ||||||
| [ | ||||||
| "/bin/sh", | ||||||
| "-c", | ||||||
| "/usr/share/elasticsearch/init.sh & /usr/local/bin/docker-entrypoint.sh", | ||||||
| ] | ||||||
| ulimits: | ||||||
| memlock: | ||||||
| soft: -1 | ||||||
| hard: -1 | ||||||
| networks: | ||||||
| - kickzo-network | ||||||
| restart: always | ||||||
| # ARM64 아키텍처 문제 해결을 위한 플랫폼 지정 | ||||||
| platform: linux/amd64 | ||||||
| healthcheck: | ||||||
| test: [ "CMD", "curl", "-f", "http://localhost:9200/_cluster/health" ] | ||||||
| interval: 10s | ||||||
| timeout: 5s | ||||||
| retries: 10 | ||||||
| start_period: 10s | ||||||
| test: | ||||||
| [ | ||||||
| "CMD-SHELL", | ||||||
| 'curl -s http://localhost:9200/_cluster/health | grep -vq ''"status":"red"''', | ||||||
|
||||||
| 'curl -s http://localhost:9200/_cluster/health | grep -vq ''"status":"red"''', | |
| "curl -s http://localhost:9200/_cluster/health | grep -vq '\"status\":\"red\"'", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
제안 전 코드로 healthcheck 되는 것을 확인했기 때문에 변경하지 않습니다.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,16 +16,19 @@ services: | |
| networks: | ||
| - kickzo-network | ||
| healthcheck: | ||
| test: [ "CMD", "curl", "-f", "http://localhost:5601/api/status" ] | ||
| interval: 10s | ||
| timeout: 5s | ||
| retries: 10 | ||
| start_period: 10s | ||
|
|
||
| test: | ||
| [ | ||
| "CMD-SHELL", | ||
| "curl -s -I http://localhost:5601/app/home | grep -q '200 OK'", | ||
| ] | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| interval: 5s | ||
| timeout: 3s | ||
| retries: 20 | ||
| start_period: 30s | ||
|
|
||
| volumes: | ||
| es-data: | ||
|
|
||
| networks: | ||
| kickzo-network: | ||
| driver: bridge | ||
| driver: bridge | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,9 @@ | ||
| # 베이스 이미지로 OpenJDK 17 사용 | ||
| FROM openjdk:17-jdk-slim | ||
| FROM amazoncorretto:17-alpine | ||
|
|
||
| # 애플리케이션 파일을 컨테이너에 복사 | ||
| ARG JAR_FILE=kickzo-0.0.1-SNAPSHOT.jar | ||
| COPY ${JAR_FILE} app.jar | ||
|
|
||
| # 애플리케이션 실행 | ||
| ENTRYPOINT ["java", "-jar", "/app.jar"] | ||
| ENTRYPOINT ["java", "-jar", "/app.jar"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,9 @@ | ||
| # 베이스 이미지로 OpenJDK 17 사용 | ||
| FROM openjdk:17-jdk-slim | ||
| FROM amazoncorretto:17-alpine | ||
|
|
||
| # 애플리케이션 파일을 컨테이너에 복사 | ||
| ARG JAR_FILE=state-0.0.1-SNAPSHOT.jar | ||
| COPY ${JAR_FILE} app.jar | ||
|
|
||
| # 애플리케이션 실행 | ||
| ENTRYPOINT ["java", "-jar", "/app.jar"] | ||
| ENTRYPOINT ["java", "-jar", "/app.jar"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 버전이 M4에 맞는 버전이군요! 바꿔주셔서 감사합니다~ 😄