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
7 changes: 6 additions & 1 deletion .github/workflows/build-push.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Build and Push

on:
pull_request:
branches:
- develop
- main
push:
branches:
- develop
Expand All @@ -22,14 +26,15 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
node-version: 20
cache: npm
- run: npm ci
- run: npm run test
- run: docker build -t triple-yjs:test .

publish_image:
needs: test_build
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
(
github.event_name == 'workflow_run' &&
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.event == 'push' &&
contains(fromJson('["develop","main"]'), github.event.workflow_run.head_branch)
)
runs-on: ubuntu-latest
Expand Down
4 changes: 1 addition & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
services:
app:
build:
context: .
dockerfile: Dockerfile
image: ${IMAGE_NAME:-ghcr.io/team-triple/triple_yjs}:${IMAGE_TAG:-develop}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

로컬 개발 환경에서의 편의성을 위해 build 설정을 유지하는 것을 권장합니다. buildimage를 함께 정의하면, 로컬에서는 docker-compose up --build를 통해 소스 코드 변경 사항을 즉시 반영하여 테스트할 수 있으며, 동시에 CI/CD 환경에서는 환경 변수를 통해 주입된 이미지 이름을 사용할 수 있어 유연성이 높아집니다.

    build:
      context: .
      dockerfile: Dockerfile
    image: ${IMAGE_NAME:-ghcr.io/team-triple/triple_yjs}:${IMAGE_TAG:-develop}

ports:
- "1234:1234"
environment:
Expand Down
Loading