Skip to content

Commit 22ef134

Browse files
committed
fix : fcm.json파일 서버로 복사 및 spring 컨테이너 볼륨 연결
1 parent edf07fc commit 22ef134

3 files changed

Lines changed: 10 additions & 1 deletion

File tree

‎.github/workflows/ci-cd.yml‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ jobs:
3434
JAR=$(ls build/libs/*.jar | head -n 1)
3535
cp "$JAR" app.jar
3636
37+
- name: Create Firebase service account file
38+
run: |
39+
mkdir -p firebase
40+
echo "${{ secrets.FCM }}" > firebase/tinybite_fcm.json
41+
3742
- name: Compute image name (change to lowercase)
3843
id: img
3944
run: echo "name=${{ env.REGISTRY }}/${GITHUB_REPOSITORY,,}" >> $GITHUB_OUTPUT
@@ -88,7 +93,7 @@ jobs:
8893
username: ${{ secrets.SSH_USERNAME }}
8994
key: ${{ secrets.SSH_KEY }}
9095
port: 22
91-
source: "docker/*,.env,nginx/,deploy.sh"
96+
source: "docker/*,.env,nginx/,deploy.sh,firebase/"
9297
target: "/home/ubuntu/tinybite/"
9398

9499
# EC2에서 도커 컨테이너 재배포

‎docker/docker-compose.blue.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ services:
22
tinybite-api-blue:
33
image: ghcr.io/tinybite-2025/tinybite-server:latest
44
container_name: tinybite-api-blue
5+
volumes:
6+
- /home/ubuntu/tinybite/firebase/tinybite_fcm.json:/app/resources/firebase/tinybite_fcm.json:ro
57
ports:
68
- "8080:8080"
79
env_file:

‎docker/docker-compose.green.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ services:
22
tinybite-api-green:
33
image: ghcr.io/tinybite-2025/tinybite-server:latest
44
container_name: tinybite-api-green
5+
volumes:
6+
- /home/ubuntu/tinybite/firebase/tinybite_fcm.json:/app/resources/firebase/tinybite_fcm.json:ro
57
ports:
68
- "8081:8080"
79
env_file:

0 commit comments

Comments
 (0)