Skip to content

Commit 2cdca50

Browse files
committed
Infra: main branch 로컬 환경과 운영 환경 동기화
- application.yml 운영 모드로 변경 - docker-compose.yml MySQL 추가
1 parent 7179479 commit 2cdca50

File tree

3 files changed

+20
-6
lines changed

3 files changed

+20
-6
lines changed

docker-compose.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,20 @@ services:
1010
- redis_data:/data
1111
command: ["redis-server", "--appendonly", "yes"]
1212

13+
mysql:
14+
image: mysql:8.0
15+
container_name: local-mysql
16+
restart: always
17+
environment:
18+
MYSQL_ROOT_PASSWORD: rootpass
19+
MYSQL_DATABASE: catfe
20+
MYSQL_USER: catfe_user
21+
MYSQL_PASSWORD: catfe_pass
22+
ports:
23+
- "3306:3306"
24+
volumes:
25+
- mysql_data:/var/lib/mysql
26+
1327
volumes:
14-
redis_data:
28+
redis_data:
29+
mysql_data:

src/main/java/com/back/global/config/EmbeddedRedisConfig.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ public class EmbeddedRedisConfig {
2626
public void startRedis() {
2727
try {
2828
String osName = System.getProperty("os.name").toLowerCase();
29-
3029
// Mac 환경이면 embedded-redis 건너뛰고 docker-compose Redis 사용
3130
if (osName.contains("mac")) {
3231
System.out.println("Mac 환경 감지 → embedded-redis 비활성화, docker-compose Redis 사용");

src/main/resources/application.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ spring:
33
name: catfe-backend
44

55
# 개발환경
6-
profiles:
7-
active: dev
6+
# profiles:
7+
# active: dev
88

99
# 운영환경
10-
# profiles:
11-
# active: prod
10+
profiles:
11+
active: prod

0 commit comments

Comments
 (0)