Skip to content

Commit

Permalink
Feat: testing for raspberry pi
Browse files Browse the repository at this point in the history
  • Loading branch information
sunwupark committed Nov 17, 2024
1 parent 03ea4a8 commit c0e7475
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dev_ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: MeMe CI/CD

on:
push:
branches: ["develop", "main"]
branches: ["develop", "main", 'feat/#55']

jobs:
build:
Expand Down
5 changes: 4 additions & 1 deletion MEME-AUTH/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ dependencies {

// Spring Security
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-security'
testImplementation 'org.springframework.security:spring-security-test'

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

// Spring Boot Actuator
implementation 'org.springframework.boot:spring-boot-starter-actuator'


runtimeOnly 'com.h2database:h2' // h2 추가
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@
import org.springframework.context.annotation.Configuration;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.authentication.dao.DaoAuthenticationProvider;
import org.springframework.security.config.Customizer;
import org.springframework.security.config.annotation.authentication.configuration.AuthenticationConfiguration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.web.SecurityFilterChain;
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;


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


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@
import org.meme.auth.service.AuthService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

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

@Slf4j(topic = "MEME-AUTH")
@RequiredArgsConstructor
@RestController("/api/v2")
@RestController
@RequestMapping("/api/v2") // 클래스 레벨 URL 매핑
public class AuthController {

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

Expand Down
16 changes: 15 additions & 1 deletion MEME-AUTH/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,18 @@ springdoc:
path: /auth/docs

server:
port: 8081
port: 8081

logging:
level:
org:
springframework: DEBUG

management:
endpoints:
web:
exposure:
include: "*"
endpoint:
health:
show-details: "always"
2 changes: 1 addition & 1 deletion MEME-RESERVATION/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ spring:
port: 6379

server:
port: 8083
port: 8082

2 changes: 1 addition & 1 deletion MEME-SERVICE/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ spring:
format_sql: true

server:
port: 8084
port: 8083

52 changes: 28 additions & 24 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,51 @@ services:
container_name: auth
image: sunwupark/meme-server-auth
expose:
- 8080
- 8081
ports:
- "8080:8080"
- "8081:8081"
networks:
- meme
environment:
- APPLE_CLIENT_ID=umc.MEME
- DB_PASSWORD=1234
- DB_USERNAME=root
- DB_PASSWORD=park13579@
- DB_USERNAME=sunwupark
- JWT_SECRET_KEY=c2lsdmVybmluZS10ZWNoLXNwcmluZy1ib290LWp3dC10dXRvcmlhbC1zZWNyZXQtc2lsdmVybmluZS10ZWNoLXNwcmluZy1ib290LWp3dC10dXRvcmlhbC1zZWNyZXQK
- KAKAO_REST_API_KEY=3d9ba27e79e64cf857e8e91bbfc88346
- DB_SCHEMA=meme_db
- SPRING_DATASOURCE_URL=jdbc:mysql://mysql_container:3306/meme_db?useSSL=false&useUnicode=true&characterEncoding=utf8&allowPublicKeyRetrieval=true
- REDIS_URL=www.dungdungcloud.shop
- SPRING_DATASOURCE_URL=jdbc:mysql://192.168.45.225:3306/meme_db?useSSL=false&useUnicode=true&characterEncoding=utf8&allowPublicKeyRetrieval=true
- REDIS_URL=192.168.45.225
reservation:
container_name: reservation
image: sunwupark/meme-server-reservation
expose:
- 8083
ports:
- "8083:8083"
- "8082:8082"
networks:
- meme
environment:
- DB_PASSWORD=1234
- DB_USERNAME=root
- SPRING_DATASOURCE_URL=jdbc:mysql://mysql_container:3306/meme_db?useSSL=false&useUnicode=true&characterEncoding=utf8&allowPublicKeyRetrieval=true
- REDIS_URL=www.dungdungcloud.shop
- DB_PASSWORD=park13579@
- DB_USERNAME=sunwupark
- SPRING_DATASOURCE_URL=jdbc:mysql://192.168.45.225:3306/meme_db?useSSL=false&useUnicode=true&characterEncoding=utf8&allowPublicKeyRetrieval=true
- REDIS_URL=192.168.45.225
service:
container_name: service
image: sunwupark/meme-server-service
expose:
- 8083
ports:
- "8083:8083"
environment:
- DB_PASSWORD=park13579@
- DB_USERNAME=sunwupark
- SPRING_DATASOURCE_URL=jdbc:mysql://192.168.45.225:3306/meme_db?useSSL=false&useUnicode=true&characterEncoding=utf8&allowPublicKeyRetrieval=true
- REDIS_URL=192.168.45.225

networks:
meme:
driver: bridge
external: true
# notification:
# container_name: notification
# image: sunwupark/meme-server-notification
Expand All @@ -51,16 +68,3 @@ services:
# - DB_SCHEMA=meme_db
# - SPRING_DATASOURCE_URL=jdbc:mysql://mysql_container:3306/meme_db?useSSL=false&useUnicode=true&characterEncoding=utf8&allowPublicKeyRetrieval=true
# - REDIS_URL=www.dungdungcloud.shop
#
# service:
# container_name: service
# image: sunwupark/meme-server-service
# expose:
# - 8083
# ports:
# - "8083:8083"
#
networks:
meme:
driver: bridge
external: true

0 comments on commit c0e7475

Please sign in to comment.