From 4be260eb5fe1f7833285a03d934d23b818d17827 Mon Sep 17 00:00:00 2001 From: ddingmin Date: Wed, 15 Jul 2026 00:21:14 +0900 Subject: [PATCH 01/10] =?UTF-8?q?chore:=20=EA=B0=9C=EB=B0=9C=20=ED=99=98?= =?UTF-8?q?=EA=B2=BD=20=ED=94=84=EB=A1=9C=ED=95=84=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/application-dev.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/main/resources/application-dev.yml diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml new file mode 100644 index 0000000..4b57c9a --- /dev/null +++ b/src/main/resources/application-dev.yml @@ -0,0 +1,12 @@ +spring: + config: + activate: + on-profile: dev + +server: + shutdown: graceful + +logging: + level: + root: INFO + com.mogumogu.momogo: DEBUG From 4caf00f12a6e83020d31625e792ceec59a5068d3 Mon Sep 17 00:00:00 2001 From: ddingmin Date: Wed, 15 Jul 2026 00:22:48 +0900 Subject: [PATCH 02/10] =?UTF-8?q?chore:=20Jib=20=EC=BB=A8=ED=85=8C?= =?UTF-8?q?=EC=9D=B4=EB=84=88=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EB=B9=8C?= =?UTF-8?q?=EB=93=9C=20=EA=B5=AC=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/build.gradle b/build.gradle index e228695..5172ff5 100644 --- a/build.gradle +++ b/build.gradle @@ -3,6 +3,7 @@ plugins { id 'org.jetbrains.kotlin.plugin.spring' version '2.3.21' id 'org.springframework.boot' version '4.1.0' id 'io.spring.dependency-management' version '1.1.7' + id 'com.google.cloud.tools.jib' version '3.5.3' } group = 'com.mogumogu' @@ -51,3 +52,35 @@ kotlin { tasks.named('test') { useJUnitPlatform() } + +def imageRepository = System.getenv('IMAGE_REPOSITORY') ?: 'ghcr.io/nexters/momogo-server' +def imageRevision = System.getenv('IMAGE_REVISION') ?: 'local' +def additionalImageTags = (System.getenv('IMAGE_TAGS') ?: '') + .split(',') + .collect { it.trim() } + .findAll { !it.isEmpty() } + .toSet() + +jib { + from { + image = 'eclipse-temurin:21-jre@sha256:d2b9f8f12212cadcfdf889461531784e8fd097feade954d65b31ee7a71c473ec' + platforms { + platform { + architecture = 'amd64' + os = 'linux' + } + } + } + to { + image = "${imageRepository}:${imageRevision}" + tags = additionalImageTags + } + container { + user = '1000:1000' + ports = ['8080'] + labels = [ + 'org.opencontainers.image.source': 'https://github.com/Nexters/momogo-server', + 'org.opencontainers.image.revision': imageRevision, + ] + } +} From 51ef4710e0b8855a07f1e983f78384674d626fdf Mon Sep 17 00:00:00 2001 From: ddingmin Date: Wed, 15 Jul 2026 00:29:03 +0900 Subject: [PATCH 03/10] =?UTF-8?q?chore:=20GHCR=20=EC=9D=B4=EB=AF=B8?= =?UTF-8?q?=EC=A7=80=20=EA=B2=8C=EC=8B=9C=20=EC=9E=90=EB=8F=99=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cd.yml | 235 +++++++++++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 16 +++ 2 files changed, 251 insertions(+) create mode 100644 .github/workflows/cd.yml diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 0000000..b3b55ba --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,235 @@ +name: CD + +on: + workflow_call: + inputs: + target: + description: Moving image tag to publish + required: true + type: string + revision: + description: Full Git SHA to publish + required: true + type: string + ref_name: + description: Source branch name + required: true + type: string + secrets: + DISCORD_WEBHOOK_URL: + required: true + workflow_dispatch: + inputs: + target: + description: Moving image tag to publish + required: true + type: choice + options: + - main + - production + revision: + description: Full Git SHA (leave blank to use the selected branch HEAD) + required: false + type: string + +permissions: + contents: read + packages: write + +concurrency: + group: cd-${{ inputs.target }} + cancel-in-progress: true + +jobs: + publish: + name: Publish ${{ inputs.target }} image + runs-on: ubuntu-latest + timeout-minutes: 15 + env: + IMAGE_REPOSITORY: ghcr.io/nexters/momogo-server + IMAGE_REVISION: ${{ inputs.revision || github.sha }} + IMAGE_TAGS: ${{ inputs.target }} + SOURCE_BRANCH: ${{ inputs.ref_name || github.ref_name }} + + steps: + - name: Validate publish target + env: + DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} + run: | + if [[ ! "$IMAGE_REVISION" =~ ^[0-9a-f]{40}$ ]]; then + echo "revision must be a full Git SHA" >&2 + exit 1 + fi + + if [[ -z "$DISCORD_WEBHOOK_URL" ]]; then + echo "DISCORD_WEBHOOK_URL secret is required" >&2 + exit 1 + fi + + if [[ "$IMAGE_TAGS" == "main" && "$SOURCE_BRANCH" != "main" ]]; then + echo "the main image can only be published from the main branch" >&2 + exit 1 + fi + + if [[ "$IMAGE_TAGS" == "production" && "$SOURCE_BRANCH" != release/* ]]; then + echo "the production image can only be published from a release/** branch" >&2 + exit 1 + fi + + - name: Checkout + uses: actions/checkout@v6 + with: + ref: ${{ inputs.revision || github.sha }} + fetch-depth: 0 + + - name: Verify revision belongs to source branch + run: | + git fetch --no-tags origin "$SOURCE_BRANCH" + if ! git merge-base --is-ancestor "$IMAGE_REVISION" FETCH_HEAD; then + echo "revision does not belong to $SOURCE_BRANCH" >&2 + exit 1 + fi + + - name: Set up Java + uses: actions/setup-java@v5 + with: + distribution: temurin + java-version: 21 + + - name: Set up Gradle + uses: gradle/actions/setup-gradle@v6 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to GHCR + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Find previous published revision + id: previous + run: | + previous_revision="" + + if labels=$(docker buildx imagetools inspect \ + "$IMAGE_REPOSITORY:$IMAGE_TAGS" \ + --format '{{json .Image.Config.Labels}}' 2>/dev/null); then + candidate=$(jq -r '."org.opencontainers.image.revision" // empty' <<< "$labels") + if [[ "$candidate" =~ ^[0-9a-f]{40}$ ]]; then + previous_revision="$candidate" + fi + fi + + echo "revision=$previous_revision" >> "$GITHUB_OUTPUT" + + - name: Run checks for manual publish + if: ${{ github.event_name == 'workflow_dispatch' }} + run: ./gradlew check --no-daemon + + - name: Prepare commit summary + id: changes + env: + PREVIOUS_REVISION: ${{ steps.previous.outputs.revision }} + run: | + repository_url="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" + comparison_url="$repository_url/commit/$IMAGE_REVISION" + + if [[ -n "$PREVIOUS_REVISION" ]] && git cat-file -e "$PREVIOUS_REVISION^{commit}"; then + if [[ "$PREVIOUS_REVISION" == "$IMAGE_REVISION" ]]; then + commit_summary="변경된 커밋 없음 (동일 revision 재게시)" + else + comparison_url="$repository_url/compare/$PREVIOUS_REVISION...$IMAGE_REVISION" + commit_count=$(git rev-list --count "$PREVIOUS_REVISION..$IMAGE_REVISION") + commit_summary="" + + while IFS=$'\t' read -r full_sha short_sha subject; do + subject="${subject:0:60}" + commit_summary+="• [\`$short_sha\`]($repository_url/commit/$full_sha) $subject"$'\n' + done < <(git log --max-count=5 --format='%H%x09%h%x09%s' "$PREVIOUS_REVISION..$IMAGE_REVISION") + + if (( commit_count > 5 )); then + commit_summary+="• 그 외 $((commit_count - 5))개 커밋"$'\n' + fi + + if [[ -z "$commit_summary" ]]; then + commit_summary="비교할 수 있는 새 커밋이 없습니다." + else + commit_summary="${commit_summary%$'\n'}" + fi + fi + else + short_sha=$(git rev-parse --short=8 "$IMAGE_REVISION") + subject=$(git show -s --format='%s' "$IMAGE_REVISION") + subject="${subject:0:60}" + commit_summary="• [\`$short_sha\`]($repository_url/commit/$IMAGE_REVISION) $subject"$'\n'"• 이전 이미지 revision 없음" + fi + + { + echo "comparison_url=$comparison_url" + echo 'commit_summary<<__MOMOGO_COMMITS__' + printf '%s\n' "$commit_summary" + echo '__MOMOGO_COMMITS__' + } >> "$GITHUB_OUTPUT" + + - name: Build and push image with Jib + run: ./gradlew jib --no-daemon + + - name: Send Discord notification + env: + COMMIT_SUMMARY: ${{ steps.changes.outputs.commit_summary }} + COMPARISON_URL: ${{ steps.changes.outputs.comparison_url }} + DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} + run: | + image_digest=$(tr -d '\n' < build/jib-image.digest) + run_url="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" + short_sha="${IMAGE_REVISION:0:8}" + + if [[ "$IMAGE_TAGS" == "main" ]]; then + deployment_target="dev" + color=3447003 + else + deployment_target="production" + color=15158332 + fi + + jq -n \ + --arg title "✅ $deployment_target 이미지 푸시 완료" \ + --arg branch "$SOURCE_BRANCH" \ + --arg actor "$GITHUB_ACTOR" \ + --arg revision "$short_sha" \ + --arg revision_url "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/commit/$IMAGE_REVISION" \ + --arg image_sha "$IMAGE_REPOSITORY:$IMAGE_REVISION" \ + --arg image_alias "$IMAGE_REPOSITORY:$IMAGE_TAGS" \ + --arg digest "$image_digest" \ + --arg commits "$COMMIT_SUMMARY" \ + --arg comparison_url "$COMPARISON_URL" \ + --arg run_url "$run_url" \ + --arg timestamp "$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + --argjson color "$color" \ + '{ + username: "Momogo CD", + allowed_mentions: {parse: []}, + embeds: [{ + title: $title, + url: $run_url, + color: $color, + fields: [ + {name: "브랜치", value: $branch, inline: true}, + {name: "실행자", value: $actor, inline: true}, + {name: "Revision", value: ("[" + $revision + "](" + $revision_url + ")"), inline: true}, + {name: "이미지", value: ("`" + $image_sha + "`\n`" + $image_alias + "`"), inline: false}, + {name: "Digest", value: ("`" + $digest + "`"), inline: false}, + {name: "배포 대상 커밋", value: $commits, inline: false}, + {name: "링크", value: ("[변경사항 비교](" + $comparison_url + ") · [Actions 실행](" + $run_url + ")"), inline: false} + ], + timestamp: $timestamp + }] + }' > "$RUNNER_TEMP/discord-payload.json" + + curl --fail-with-body --silent --show-error \ + -H 'Content-Type: application/json' \ + --data-binary "@$RUNNER_TEMP/discord-payload.json" \ + "$DISCORD_WEBHOOK_URL" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bb999a6..d2659a0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,7 @@ on: push: branches: - main + - 'release/**' permissions: contents: read @@ -72,3 +73,18 @@ jobs: build/test-results/test if-no-files-found: warn retention-days: 7 + + publish-image: + name: Publish image + needs: test + if: ${{ github.event_name == 'push' }} + permissions: + contents: read + packages: write + uses: ./.github/workflows/cd.yml + with: + target: ${{ github.ref_name == 'main' && 'main' || 'production' }} + revision: ${{ github.sha }} + ref_name: ${{ github.ref_name }} + secrets: + DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} From c2038c7cb38c4785414240a2cfbb0d74edbccfeb Mon Sep 17 00:00:00 2001 From: ddingmin Date: Wed, 15 Jul 2026 00:32:32 +0900 Subject: [PATCH 04/10] =?UTF-8?q?chore:=20=EB=A9=80=ED=8B=B0=20=EC=95=84?= =?UTF-8?q?=ED=82=A4=ED=85=8D=EC=B2=98=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20?= =?UTF-8?q?=EA=B2=8C=EC=8B=9C=20=EA=B5=AC=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cd.yml | 1 + build.gradle | 13 ++++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index b3b55ba..6246449 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -49,6 +49,7 @@ jobs: IMAGE_REPOSITORY: ghcr.io/nexters/momogo-server IMAGE_REVISION: ${{ inputs.revision || github.sha }} IMAGE_TAGS: ${{ inputs.target }} + IMAGE_ARCHITECTURES: amd64,arm64 SOURCE_BRANCH: ${{ inputs.ref_name || github.ref_name }} steps: diff --git a/build.gradle b/build.gradle index 5172ff5..144605b 100644 --- a/build.gradle +++ b/build.gradle @@ -60,14 +60,21 @@ def additionalImageTags = (System.getenv('IMAGE_TAGS') ?: '') .collect { it.trim() } .findAll { !it.isEmpty() } .toSet() +def imageArchitectures = (System.getenv('IMAGE_ARCHITECTURES') ?: 'amd64') + .split(',') + .collect { it.trim() } + .findAll { !it.isEmpty() } + .toSet() jib { from { image = 'eclipse-temurin:21-jre@sha256:d2b9f8f12212cadcfdf889461531784e8fd097feade954d65b31ee7a71c473ec' platforms { - platform { - architecture = 'amd64' - os = 'linux' + imageArchitectures.each { imageArchitecture -> + platform { + architecture = imageArchitecture + os = 'linux' + } } } } From b13d45c7b465115f1b08fd847d6d1ecef4636c9f Mon Sep 17 00:00:00 2001 From: ddingmin Date: Wed, 15 Jul 2026 00:34:08 +0900 Subject: [PATCH 05/10] =?UTF-8?q?chore:=20Docker=20Compose=20=EB=B0=B0?= =?UTF-8?q?=ED=8F=AC=20=EA=B5=AC=EC=84=B1=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.example | 10 ++++++++++ compose.yml | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 .env.example create mode 100644 compose.yml diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..8c3f1cc --- /dev/null +++ b/.env.example @@ -0,0 +1,10 @@ +# Development: IMAGE_TAG=main and DEPLOY_ENV=dev +# Production: IMAGE_TAG=production and DEPLOY_ENV=prod +IMAGE_TAG=main +DEPLOY_ENV=dev + +APP_BIND_ADDRESS=127.0.0.1 +APP_PORT=8080 + +DB_URL=jdbc:postgresql://host.docker.internal:5432/momogo +DB_USERNAME=momogo diff --git a/compose.yml b/compose.yml new file mode 100644 index 0000000..a6e13b2 --- /dev/null +++ b/compose.yml @@ -0,0 +1,32 @@ +services: + app: + image: "ghcr.io/nexters/momogo-server:${IMAGE_TAG:?IMAGE_TAG is required}" + pull_policy: always + restart: unless-stopped + init: true + stop_grace_period: 30s + + ports: + - "${APP_BIND_ADDRESS:-127.0.0.1}:${APP_PORT:-8080}:8080" + + environment: + SPRING_PROFILES_ACTIVE: "${DEPLOY_ENV:?DEPLOY_ENV is required}" + SPRING_CONFIG_IMPORT: configtree:/run/secrets/ + SPRING_DATASOURCE_URL: "${DB_URL:?DB_URL is required}" + SPRING_DATASOURCE_USERNAME: "${DB_USERNAME:?DB_USERNAME is required}" + + secrets: + - source: db_password + target: spring.datasource.password + - source: jwt_secret + target: momogo.security.jwt-secret + + security_opt: + - no-new-privileges:true + +secrets: + # File-backed secrets must be readable by the container's UID/GID 1000:1000. + db_password: + file: "/etc/momogo/${DEPLOY_ENV:?DEPLOY_ENV is required}/secrets/db-password" + jwt_secret: + file: "/etc/momogo/${DEPLOY_ENV:?DEPLOY_ENV is required}/secrets/jwt-secret" From 919f0aa2df41de5e05c5dcb52b9950bbc1799bf7 Mon Sep 17 00:00:00 2001 From: ddingmin Date: Wed, 15 Jul 2026 00:48:49 +0900 Subject: [PATCH 06/10] =?UTF-8?q?chore:=20fork=20=ED=99=98=EA=B2=BD=20GHCR?= =?UTF-8?q?=20=EA=B2=BD=EB=A1=9C=20=EC=A7=80=EC=9B=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cd.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 6246449..c6da7f1 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -46,13 +46,15 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 15 env: - IMAGE_REPOSITORY: ghcr.io/nexters/momogo-server IMAGE_REVISION: ${{ inputs.revision || github.sha }} IMAGE_TAGS: ${{ inputs.target }} IMAGE_ARCHITECTURES: amd64,arm64 SOURCE_BRANCH: ${{ inputs.ref_name || github.ref_name }} steps: + - name: Configure image repository + run: echo "IMAGE_REPOSITORY=ghcr.io/${GITHUB_REPOSITORY,,}" >> "$GITHUB_ENV" + - name: Validate publish target env: DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} From 7418d0750de4137c1d7b825ab0a6ef453d21c0e1 Mon Sep 17 00:00:00 2001 From: ddingmin Date: Wed, 15 Jul 2026 00:56:24 +0900 Subject: [PATCH 07/10] =?UTF-8?q?chore:=20=EB=A9=80=ED=8B=B0=20=EC=95=84?= =?UTF-8?q?=ED=82=A4=ED=85=8D=EC=B2=98=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20rev?= =?UTF-8?q?ision=20=EC=A1=B0=ED=9A=8C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cd.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index c6da7f1..ebbec6a 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -116,9 +116,25 @@ jobs: id: previous run: | previous_revision="" + image_reference="$IMAGE_REPOSITORY:$IMAGE_TAGS" + + if manifest=$(docker buildx imagetools inspect \ + "$image_reference" \ + --format '{{json .Manifest}}' 2>/dev/null); then + platform_digest=$(jq -r ' + [.manifests[]? + | select(.platform.os == "linux" and .platform.architecture == "amd64") + | .digest] + | first // empty + ' <<< "$manifest") + + if [[ -n "$platform_digest" ]]; then + image_reference="$IMAGE_REPOSITORY@$platform_digest" + fi + fi if labels=$(docker buildx imagetools inspect \ - "$IMAGE_REPOSITORY:$IMAGE_TAGS" \ + "$image_reference" \ --format '{{json .Image.Config.Labels}}' 2>/dev/null); then candidate=$(jq -r '."org.opencontainers.image.revision" // empty' <<< "$labels") if [[ "$candidate" =~ ^[0-9a-f]{40}$ ]]; then From 89518bf848eb9fe8ca6d27097f57718914b432aa Mon Sep 17 00:00:00 2001 From: ddingmin Date: Wed, 15 Jul 2026 01:01:21 +0900 Subject: [PATCH 08/10] =?UTF-8?q?chore:=20Docker=20Actions=20=EB=B2=84?= =?UTF-8?q?=EC=A0=84=20=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cd.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index ebbec6a..642554d 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -103,10 +103,10 @@ jobs: uses: gradle/actions/setup-gradle@v6 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@v4 - name: Log in to GHCR - uses: docker/login-action@v3 + uses: docker/login-action@v4 with: registry: ghcr.io username: ${{ github.actor }} From 0c6eb5395ecb4a4331afdc1c2990b1664740cdcb Mon Sep 17 00:00:00 2001 From: ddingmin Date: Wed, 15 Jul 2026 01:12:30 +0900 Subject: [PATCH 09/10] =?UTF-8?q?chore:=20Discord=20=EB=B0=B0=ED=8F=AC=20?= =?UTF-8?q?=EC=95=8C=EB=A6=BC=20=EB=AC=B8=EA=B5=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cd.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 642554d..64fc932 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -208,14 +208,16 @@ jobs: if [[ "$IMAGE_TAGS" == "main" ]]; then deployment_target="dev" + deployment_emoji="🧪" color=3447003 else deployment_target="production" + deployment_emoji="🚀" color=15158332 fi jq -n \ - --arg title "✅ $deployment_target 이미지 푸시 완료" \ + --arg title "$deployment_emoji $deployment_target 이미지 푸시 완료" \ --arg branch "$SOURCE_BRANCH" \ --arg actor "$GITHUB_ACTOR" \ --arg revision "$short_sha" \ @@ -229,7 +231,7 @@ jobs: --arg timestamp "$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ --argjson color "$color" \ '{ - username: "Momogo CD", + username: "monogo-deploy", allowed_mentions: {parse: []}, embeds: [{ title: $title, From fc3ecfc04fcc856a8c83bcd8a4fd03e54f819e5c Mon Sep 17 00:00:00 2001 From: ddingmin Date: Wed, 15 Jul 2026 21:40:20 +0900 Subject: [PATCH 10/10] =?UTF-8?q?chore:=20=EB=B0=B0=ED=8F=AC=20Compose=20?= =?UTF-8?q?=EA=B5=AC=EC=84=B1=20=EB=B6=84=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.example | 10 ---------- compose.yml | 32 -------------------------------- 2 files changed, 42 deletions(-) delete mode 100644 .env.example delete mode 100644 compose.yml diff --git a/.env.example b/.env.example deleted file mode 100644 index 8c3f1cc..0000000 --- a/.env.example +++ /dev/null @@ -1,10 +0,0 @@ -# Development: IMAGE_TAG=main and DEPLOY_ENV=dev -# Production: IMAGE_TAG=production and DEPLOY_ENV=prod -IMAGE_TAG=main -DEPLOY_ENV=dev - -APP_BIND_ADDRESS=127.0.0.1 -APP_PORT=8080 - -DB_URL=jdbc:postgresql://host.docker.internal:5432/momogo -DB_USERNAME=momogo diff --git a/compose.yml b/compose.yml deleted file mode 100644 index a6e13b2..0000000 --- a/compose.yml +++ /dev/null @@ -1,32 +0,0 @@ -services: - app: - image: "ghcr.io/nexters/momogo-server:${IMAGE_TAG:?IMAGE_TAG is required}" - pull_policy: always - restart: unless-stopped - init: true - stop_grace_period: 30s - - ports: - - "${APP_BIND_ADDRESS:-127.0.0.1}:${APP_PORT:-8080}:8080" - - environment: - SPRING_PROFILES_ACTIVE: "${DEPLOY_ENV:?DEPLOY_ENV is required}" - SPRING_CONFIG_IMPORT: configtree:/run/secrets/ - SPRING_DATASOURCE_URL: "${DB_URL:?DB_URL is required}" - SPRING_DATASOURCE_USERNAME: "${DB_USERNAME:?DB_USERNAME is required}" - - secrets: - - source: db_password - target: spring.datasource.password - - source: jwt_secret - target: momogo.security.jwt-secret - - security_opt: - - no-new-privileges:true - -secrets: - # File-backed secrets must be readable by the container's UID/GID 1000:1000. - db_password: - file: "/etc/momogo/${DEPLOY_ENV:?DEPLOY_ENV is required}/secrets/db-password" - jwt_secret: - file: "/etc/momogo/${DEPLOY_ENV:?DEPLOY_ENV is required}/secrets/jwt-secret"