Skip to content

Commit c0e7475

Browse files
committedNov 17, 2024·
Feat: testing for raspberry pi
1 parent 03ea4a8 commit c0e7475

File tree

8 files changed

+58
-30
lines changed

8 files changed

+58
-30
lines changed
 

‎.github/workflows/dev_ci_cd.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: MeMe CI/CD
22

33
on:
44
push:
5-
branches: ["develop", "main"]
5+
branches: ["develop", "main", 'feat/#55']
66

77
jobs:
88
build:

‎MEME-AUTH/build.gradle

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ dependencies {
1111

1212
// Spring Security
1313
implementation 'org.springframework.boot:spring-boot-starter-security'
14-
implementation 'org.springframework.boot:spring-boot-starter-security'
1514
testImplementation 'org.springframework.security:spring-security-test'
1615

1716
// Json Web Token
@@ -28,6 +27,10 @@ dependencies {
2827
// Embedded Redis
2928
implementation 'it.ozimov:embedded-redis:0.7.2'
3029

30+
// Spring Boot Actuator
31+
implementation 'org.springframework.boot:spring-boot-starter-actuator'
32+
33+
3134
runtimeOnly 'com.h2database:h2' // h2 추가
3235
}
3336

‎MEME-AUTH/src/main/java/org/meme/auth/config/SecurityConfig.java

+4
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,16 @@
99
import org.springframework.context.annotation.Configuration;
1010
import org.springframework.security.authentication.AuthenticationManager;
1111
import org.springframework.security.authentication.dao.DaoAuthenticationProvider;
12+
import org.springframework.security.config.Customizer;
1213
import org.springframework.security.config.annotation.authentication.configuration.AuthenticationConfiguration;
1314
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
1415
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
1516
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
1617
import org.springframework.security.web.SecurityFilterChain;
1718
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
1819
import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer;
20+
import org.springframework.web.servlet.config.annotation.CorsRegistry;
21+
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
1922

2023

2124
import static org.springframework.security.config.http.SessionCreationPolicy.*;
@@ -55,6 +58,7 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti
5558
.requestMatchers("/api/v1/auth/withdraw").permitAll()
5659
.requestMatchers("/api/v2/**").permitAll()
5760
.requestMatchers("/auth/**").permitAll()
61+
.requestMatchers("/actuator/**").permitAll() // 모든 Actuator 엔드포인트 허용
5862
);
5963

6064

‎MEME-AUTH/src/main/java/org/meme/auth/controller/AuthController.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,15 @@
1212
import org.meme.auth.service.AuthService;
1313
import org.springframework.web.bind.annotation.PostMapping;
1414
import org.springframework.web.bind.annotation.RequestBody;
15+
import org.springframework.web.bind.annotation.RequestMapping;
1516
import org.springframework.web.bind.annotation.RestController;
1617

1718
import static org.meme.auth.common.BaseResponseDto.SuccessResponse;
1819

1920
@Slf4j(topic = "MEME-AUTH")
2021
@RequiredArgsConstructor
21-
@RestController("/api/v2")
22+
@RestController
23+
@RequestMapping("/api/v2") // 클래스 레벨 URL 매핑
2224
public class AuthController {
2325

2426
private final AuthService authService;
@@ -31,6 +33,7 @@ public class AuthController {
3133
*/
3234
@PostMapping("/join/social")
3335
public BaseResponseDto<AuthResponse.JoinDto> socialJoin(@RequestBody AuthRequest.UserJoinDto joinDto) throws AuthException {
36+
log.info("소셜 회원가입 요청: {}", joinDto);
3437
return SuccessResponse(SuccessStatus.USER_SIGNUP_SUCCESS, authService.socialJoin(joinDto));
3538
}
3639

‎MEME-AUTH/src/main/resources/application.yml

+15-1
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,18 @@ springdoc:
4545
path: /auth/docs
4646

4747
server:
48-
port: 8081
48+
port: 8081
49+
50+
logging:
51+
level:
52+
org:
53+
springframework: DEBUG
54+
55+
management:
56+
endpoints:
57+
web:
58+
exposure:
59+
include: "*"
60+
endpoint:
61+
health:
62+
show-details: "always"

‎MEME-RESERVATION/src/main/resources/application.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ spring:
2323
port: 6379
2424

2525
server:
26-
port: 8083
26+
port: 8082
2727

‎MEME-SERVICE/src/main/resources/application.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ spring:
1818
format_sql: true
1919

2020
server:
21-
port: 8084
21+
port: 8083
2222

‎docker-compose.yml

+28-24
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,51 @@ services:
55
container_name: auth
66
image: sunwupark/meme-server-auth
77
expose:
8-
- 8080
8+
- 8081
99
ports:
10-
- "8080:8080"
10+
- "8081:8081"
1111
networks:
1212
- meme
1313
environment:
1414
- APPLE_CLIENT_ID=umc.MEME
15-
- DB_PASSWORD=1234
16-
- DB_USERNAME=root
15+
- DB_PASSWORD=park13579@
16+
- DB_USERNAME=sunwupark
1717
- JWT_SECRET_KEY=c2lsdmVybmluZS10ZWNoLXNwcmluZy1ib290LWp3dC10dXRvcmlhbC1zZWNyZXQtc2lsdmVybmluZS10ZWNoLXNwcmluZy1ib290LWp3dC10dXRvcmlhbC1zZWNyZXQK
1818
- KAKAO_REST_API_KEY=3d9ba27e79e64cf857e8e91bbfc88346
1919
- DB_SCHEMA=meme_db
20-
- SPRING_DATASOURCE_URL=jdbc:mysql://mysql_container:3306/meme_db?useSSL=false&useUnicode=true&characterEncoding=utf8&allowPublicKeyRetrieval=true
21-
- REDIS_URL=www.dungdungcloud.shop
20+
- SPRING_DATASOURCE_URL=jdbc:mysql://192.168.45.225:3306/meme_db?useSSL=false&useUnicode=true&characterEncoding=utf8&allowPublicKeyRetrieval=true
21+
- REDIS_URL=192.168.45.225
2222
reservation:
2323
container_name: reservation
2424
image: sunwupark/meme-server-reservation
2525
expose:
2626
- 8083
2727
ports:
28-
- "8083:8083"
28+
- "8082:8082"
2929
networks:
3030
- meme
3131
environment:
32-
- DB_PASSWORD=1234
33-
- DB_USERNAME=root
34-
- SPRING_DATASOURCE_URL=jdbc:mysql://mysql_container:3306/meme_db?useSSL=false&useUnicode=true&characterEncoding=utf8&allowPublicKeyRetrieval=true
35-
- REDIS_URL=www.dungdungcloud.shop
32+
- DB_PASSWORD=park13579@
33+
- DB_USERNAME=sunwupark
34+
- SPRING_DATASOURCE_URL=jdbc:mysql://192.168.45.225:3306/meme_db?useSSL=false&useUnicode=true&characterEncoding=utf8&allowPublicKeyRetrieval=true
35+
- REDIS_URL=192.168.45.225
36+
service:
37+
container_name: service
38+
image: sunwupark/meme-server-service
39+
expose:
40+
- 8083
41+
ports:
42+
- "8083:8083"
43+
environment:
44+
- DB_PASSWORD=park13579@
45+
- DB_USERNAME=sunwupark
46+
- SPRING_DATASOURCE_URL=jdbc:mysql://192.168.45.225:3306/meme_db?useSSL=false&useUnicode=true&characterEncoding=utf8&allowPublicKeyRetrieval=true
47+
- REDIS_URL=192.168.45.225
48+
49+
networks:
50+
meme:
51+
driver: bridge
52+
external: true
3653
# notification:
3754
# container_name: notification
3855
# image: sunwupark/meme-server-notification
@@ -51,16 +68,3 @@ services:
5168
# - DB_SCHEMA=meme_db
5269
# - SPRING_DATASOURCE_URL=jdbc:mysql://mysql_container:3306/meme_db?useSSL=false&useUnicode=true&characterEncoding=utf8&allowPublicKeyRetrieval=true
5370
# - REDIS_URL=www.dungdungcloud.shop
54-
#
55-
# service:
56-
# container_name: service
57-
# image: sunwupark/meme-server-service
58-
# expose:
59-
# - 8083
60-
# ports:
61-
# - "8083:8083"
62-
#
63-
networks:
64-
meme:
65-
driver: bridge
66-
external: true

0 commit comments

Comments
 (0)