Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.google.firebase.FirebaseOptions;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.ClassPathResource;

import java.io.FileInputStream;
import java.io.IOException;
Expand All @@ -16,11 +17,13 @@ public class FCMConfig {
public FirebaseApp firebaseApp() throws IOException {
if (FirebaseApp.getApps().isEmpty()) {
// μ„œλΉ„μŠ€ 계정 ν‚€ JSON 파일 경둜
FileInputStream serviceAccount =
new FileInputStream("src/main/resources/claog-1e23b-firebase-adminsdk-fbsvc-25a8b72901.json");
// FileInputStream serviceAccount =
// new FileInputStream("src/main/resources/claog-1e23b-firebase-adminsdk-fbsvc-25a8b72901.json");

FirebaseOptions options = FirebaseOptions.builder()
.setCredentials(GoogleCredentials.fromStream(serviceAccount))
.setCredentials(GoogleCredentials.fromStream(
new ClassPathResource("claog-1e23b-firebase-adminsdk-fbsvc-25a8b72901.json").getInputStream()
))
.build();

return FirebaseApp.initializeApp(options);
Expand Down
28 changes: 2 additions & 26 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,43 +15,22 @@ services:

backend:
image: ${DOCKERHUB_USERNAME}/classlog-backend:${IMAGE_TAG}
# build:
# context: backend
# dockerfile: Dockerfile
container_name: classlog-backend
ports:
- 8081:8081
env_file:
- backend/.env
depends_on:
# mysql:
# condition: service_healthy
redis:
condition: service_healthy
ai:
condition: service_started
volumes:
- ./backend/src/main/resources/claog-1e23b-firebase-adminsdk-fbsvc-25a8b72901.json:/app/src/main/resources/claog-1e23b-firebase-adminsdk-fbsvc-25a8b72901.json:ro
networks:
- classlog-network
restart: unless-stopped

# mysql:
# image: mysql
# container_name: classlog-mysql
# environment:
# MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
# MYSQL_DATABASE: ${DB_NAME}
# MYSQL_PASSWORD: ${DB_PASSWORD}
# volumes:
# - ./mysql_data:/var/lib/mysql
# ports:
# - 3306:3306
# healthcheck:
# test: [ "CMD", "mysqladmin", "ping" ]
# interval: 5s
# retries: 10
# networks:
# - classlog-network

redis:
image: redis
container_name: classlog-redis
Expand All @@ -77,9 +56,6 @@ services:

frontend:
image: ${DOCKERHUB_USERNAME}/classlog-frontend:${IMAGE_TAG}
# build:
# context: frontend
# dockerfile: Dockerfile
container_name: classlog-frontend
ports:
- "3000:3000"
Expand Down