File tree Expand file tree Collapse file tree 2 files changed +8
-29
lines changed
backend/src/main/java/org/example/backend/global/userdeviceToken Expand file tree Collapse file tree 2 files changed +8
-29
lines changed Original file line number Diff line number Diff line change 55import com .google .firebase .FirebaseOptions ;
66import org .springframework .context .annotation .Bean ;
77import org .springframework .context .annotation .Configuration ;
8+ import org .springframework .core .io .ClassPathResource ;
89
910import java .io .FileInputStream ;
1011import java .io .IOException ;
@@ -16,11 +17,13 @@ public class FCMConfig {
1617 public FirebaseApp firebaseApp () throws IOException {
1718 if (FirebaseApp .getApps ().isEmpty ()) {
1819 // 서비스 계정 키 JSON 파일 경로
19- FileInputStream serviceAccount =
20- new FileInputStream ("src/main/resources/claog-1e23b-firebase-adminsdk-fbsvc-25a8b72901.json" );
20+ // FileInputStream serviceAccount =
21+ // new FileInputStream("src/main/resources/claog-1e23b-firebase-adminsdk-fbsvc-25a8b72901.json");
2122
2223 FirebaseOptions options = FirebaseOptions .builder ()
23- .setCredentials (GoogleCredentials .fromStream (serviceAccount ))
24+ .setCredentials (GoogleCredentials .fromStream (
25+ new ClassPathResource ("claog-1e23b-firebase-adminsdk-fbsvc-25a8b72901.json" ).getInputStream ()
26+ ))
2427 .build ();
2528
2629 return FirebaseApp .initializeApp (options );
Original file line number Diff line number Diff line change @@ -15,43 +15,22 @@ services:
1515
1616 backend :
1717 image : ${DOCKERHUB_USERNAME}/classlog-backend:${IMAGE_TAG}
18- # build:
19- # context: backend
20- # dockerfile: Dockerfile
2118 container_name : classlog-backend
2219 ports :
2320 - 8081:8081
2421 env_file :
2522 - backend/.env
2623 depends_on :
27- # mysql:
28- # condition: service_healthy
2924 redis :
3025 condition : service_healthy
3126 ai :
3227 condition : service_started
28+ volumes :
29+ - ./backend/src/main/resources/claog-1e23b-firebase-adminsdk-fbsvc-25a8b72901.json:/app/src/main/resources/claog-1e23b-firebase-adminsdk-fbsvc-25a8b72901.json:ro
3330 networks :
3431 - classlog-network
3532 restart : unless-stopped
3633
37- # mysql:
38- # image: mysql
39- # container_name: classlog-mysql
40- # environment:
41- # MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
42- # MYSQL_DATABASE: ${DB_NAME}
43- # MYSQL_PASSWORD: ${DB_PASSWORD}
44- # volumes:
45- # - ./mysql_data:/var/lib/mysql
46- # ports:
47- # - 3306:3306
48- # healthcheck:
49- # test: [ "CMD", "mysqladmin", "ping" ]
50- # interval: 5s
51- # retries: 10
52- # networks:
53- # - classlog-network
54-
5534 redis :
5635 image : redis
5736 container_name : classlog-redis
@@ -77,9 +56,6 @@ services:
7756
7857 frontend :
7958 image : ${DOCKERHUB_USERNAME}/classlog-frontend:${IMAGE_TAG}
80- # build:
81- # context: frontend
82- # dockerfile: Dockerfile
8359 container_name : classlog-frontend
8460 ports :
8561 - " 3000:3000"
You can’t perform that action at this time.
0 commit comments