Skip to content

Commit

Permalink
Merge pull request #92 from zeze1004/chore/remove-redis
Browse files Browse the repository at this point in the history
[#91] 배포 스크립트 수정
  • Loading branch information
zeze1004 authored May 14, 2024
2 parents 40ff6c6 + 2f26863 commit 75ddb52
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 68 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,8 @@ COPY --from=build /workspace/app/build/libs/wedding-0.0.1-SNAPSHOT.jar app.jar
# init.sql 파일 복사
COPY init.sql /docker-entrypoint-initdb.d/init.sql

# 로그 디렉토리 생성 및 권한 설정
RUN mkdir -p /app/logs && chmod -R 755 /app/logs

# 애플리케이션 실행 시 dev 프로파일 활성화
ENTRYPOINT ["java", "-Dspring.profiles.active=dev", "-jar", "app.jar"]
3 changes: 0 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ dependencies {
implementation 'ch.qos.logback.contrib:logback-jackson:0.1.5'
implementation 'net.logstash.logback:logstash-logback-encoder:7.4'

implementation 'org.springframework.session:spring-session-data-redis'
implementation 'org.springframework.boot:spring-boot-starter-data-redis'

implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:3.0.3'
runtimeOnly 'com.mysql:mysql-connector-j'

Expand Down
8 changes: 2 additions & 6 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ services:
build: .
depends_on:
- mysql
- redis
ports:
- "8080:8080"
volumes:
- ./logs:/app/logs
mysql:
image: mysql:8.0.28
platform: linux/amd64
Expand All @@ -19,11 +20,6 @@ services:
- "3306:3306"
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
redis:
image: redis:alpine
command: redis-server --port 6379
ports:
- "6379:6379"
nginx:
image: nginx:latest
ports:
Expand Down
31 changes: 0 additions & 31 deletions src/main/java/org/wedding/config/RedisConfig.java

This file was deleted.

14 changes: 0 additions & 14 deletions src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,6 @@ spring:
datasource:
url: jdbc:mysql://mysql:3306/wedding

session:
store-type: redis
data:
redis:
host: redis
port: 6379
timeout: 1000
lettuce:
pool:
max-active: 8
max-wait: -1
max-idle: 8
min-idle: 0

mybatis:
mapper-locations: classpath:mapper/**/*.xml
type-aliases-package: org.wedding.*
Expand Down
14 changes: 0 additions & 14 deletions src/main/resources/application-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,6 @@ spring:
username: root
password:

session:
store-type: redis
data:
redis:
host: localhost
port: 6379
timeout: 1000
lettuce:
pool:
max-active: 8
max-wait: -1
max-idle: 8
min-idle: 0

mybatis:
mapper-locations: classpath:mapper/**/*.xml
type-aliases-package: org.wedding.*
Expand Down
8 changes: 8 additions & 0 deletions src/main/resources/logback-spring.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@
</springProfile>

<springProfile name="prod,dev">
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>${CONSOLE_LOG_PATTERN}</pattern>
<charset>utf8</charset>
<appendLineSeparator>true</appendLineSeparator>
</encoder>
</appender>
<appender name="ERROR_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${LOG_DIR}/${LOG_FILE}</file>
<filter class="ch.qos.logback.classic.filter.LevelFilter">
Expand All @@ -44,6 +51,7 @@
</rollingPolicy>
</appender>
<root level="error">
<appender-ref ref="CONSOLE" />
<appender-ref ref="ERROR_FILE" />
</root>
</springProfile>
Expand Down

0 comments on commit 75ddb52

Please sign in to comment.