Skip to content

chore(be): 배포 환경변수 및 Dockerfile 정리 - #52

Merged
HOKAGO-MEMORIES merged 3 commits into
developfrom
docs/deployment-guide
Jun 24, 2026
Merged

chore(be): 배포 환경변수 및 Dockerfile 정리#52
HOKAGO-MEMORIES merged 3 commits into
developfrom
docs/deployment-guide

Conversation

@HOKAGO-MEMORIES

@HOKAGO-MEMORIES HOKAGO-MEMORIES commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

변경 내용

  • Cloud Run, Vercel, Upstash Redis 배포 가이드를 추가했습니다.
  • Spring Boot Cloud Run 배포용 Dockerfile과 .dockerignore를 추가했습니다.
  • Upstash Redis TCP 연결을 위한 Spring Redis username/password/SSL 환경변수 설정을 추가했습니다.

테스트

  • backend Maven package: ./mvnw.cmd -B -ntp package -DskipTests
  • backend test: 로컬 backend/.env의 REDIS_HOST 중복으로 spring-dotenv 로딩 단계에서 실패
  • docker build: Docker Desktop daemon 미실행으로 미확인

Summary by CodeRabbit

  • Chores

    • Improved backend container builds with a multi-stage Docker setup and a cleaner Docker build context.
    • Added/expanded environment configuration templates for backend and frontend.
    • Extended Redis support to allow optional authentication credentials and SSL enablement.
  • Documentation

    • Added a comprehensive deployment guide (Korean) covering the overall architecture, required environment variables, deployment commands, verification steps, and a rollout checklist.

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e03dca30-8bbf-44df-a4c7-157cfe23cd99

📥 Commits

Reviewing files that changed from the base of the PR and between c0e457a and 0a2df88.

📒 Files selected for processing (1)
  • backend/Dockerfile
🚧 Files skipped from review as they are similar to previous changes (1)
  • backend/Dockerfile

📝 Walkthrough

Walkthrough

Adds a multi-stage backend/Dockerfile and .dockerignore for Cloud Run deployment, expands Redis application.properties with auth and SSL toggle, populates backend/.env.example and frontend/.env.example with service placeholders, and introduces docs/14_DEPLOYMENT_GUIDE.md with full Korean deployment instructions for the Vercel + Cloud Run + Supabase + Upstash stack.

Changes

Cloud Run Deployment Setup

Layer / File(s) Summary
Backend Docker build and ignore rules
backend/Dockerfile, backend/.dockerignore
Multi-stage Dockerfile using JDK 21 for Maven offline dependency resolution and JRE 21 alpine for the runtime image; runs as a non-root spring user and exposes port 8080. .dockerignore excludes env files (except .env.example), build output directories, IDE folders, and *.log files.
Redis auth/SSL properties and env variable templates
backend/src/main/resources/application.properties, backend/.env.example, frontend/.env.example
Spring Boot Redis configuration gains username, password, and ssl.enabled properties backed by environment variables (defaulting SSL to false). backend/.env.example provides placeholders for Supabase, JWT, CORS, Upstash Redis, mail, and AI agent settings. frontend/.env.example adds VITE_NAVER_MAP_CLIENT_ID and VITE_API_BASE_URL.
Deployment guide: architecture, env vars, gcloud commands, checklist
docs/14_DEPLOYMENT_GUIDE.md
New Korean-language guide covering the target architecture (Vercel, Cloud Run Spring Boot, Cloud Run FastAPI, Upstash Redis, Supabase), Upstash TCP-to-env-var mapping, full environment variable tables and gcloud run deploy example commands for both services, Vercel configuration, an ordered deployment checklist, post-deploy verification steps, and a remaining-tasks list.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • ssafy-salman/salmanhae#28: That PR also modifies backend/src/main/resources/application.properties with Redis-related properties, directly overlapping with the Redis username/password/SSL additions in this PR.

Poem

🐇 Hop hop, the container is set,
A Dockerfile neat with no secrets to fret!
Redis speaks with a username and key,
Cloud Run awaits — the Spring Boot runs free.
The guide is in Korean, a checklist so bright,
Deploy all the things in the right order tonight! 🚀

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The PR title 'chore(be): 배포 환경변수 및 Dockerfile 정리' clearly summarizes the main changes: deployment environment variables configuration and Dockerfile cleanup for the backend.
Description check ✅ Passed The PR description provides a comprehensive overview of changes (deployment guide, Dockerfile, environment variables), includes test status, and documents testing constraints encountered.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/deployment-guide

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
docs/14_DEPLOYMENT_GUIDE.md (1)

79-100: 🧹 Nitpick | 🔵 Trivial | 💤 Low value

Optional: Include timeout variables in Spring Boot deployment example for completeness.

The gcloud run deploy command omits AI_AGENT_CONNECT_TIMEOUT_MS and AI_AGENT_READ_TIMEOUT_MS, which are documented in the env vars table (lines 69–70). While these have defaults in application.properties (2000 ms and 10000 ms), including them in the deploy example would improve clarity and show the complete configuration profile.

Optional addition to deploy command
   --set-env-vars INTERNAL_API_KEY="<spring-fastapi-shared-secret>"
+  --set-env-vars AI_AGENT_CONNECT_TIMEOUT_MS="2000" \
+  --set-env-vars AI_AGENT_READ_TIMEOUT_MS="10000"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/14_DEPLOYMENT_GUIDE.md` around lines 79 - 100, The gcloud run deploy
salmanhae-api command in the deployment guide is missing the
AI_AGENT_CONNECT_TIMEOUT_MS and AI_AGENT_READ_TIMEOUT_MS environment variables,
which are documented in the environment variables table and have defaults
defined in application.properties. Add two new --set-env-vars lines to the
deploy command for these timeout variables, setting AI_AGENT_CONNECT_TIMEOUT_MS
to 2000 and AI_AGENT_READ_TIMEOUT_MS to 10000 (or your preferred values) to show
the complete configuration profile.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@docs/14_DEPLOYMENT_GUIDE.md`:
- Around line 79-100: The gcloud run deploy salmanhae-api command in the
deployment guide is missing the AI_AGENT_CONNECT_TIMEOUT_MS and
AI_AGENT_READ_TIMEOUT_MS environment variables, which are documented in the
environment variables table and have defaults defined in application.properties.
Add two new --set-env-vars lines to the deploy command for these timeout
variables, setting AI_AGENT_CONNECT_TIMEOUT_MS to 2000 and
AI_AGENT_READ_TIMEOUT_MS to 10000 (or your preferred values) to show the
complete configuration profile.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 025e637b-47ef-4743-b3fd-17ff75001b0b

📥 Commits

Reviewing files that changed from the base of the PR and between 24ee902 and c0e457a.

📒 Files selected for processing (6)
  • backend/.dockerignore
  • backend/.env.example
  • backend/Dockerfile
  • backend/src/main/resources/application.properties
  • docs/14_DEPLOYMENT_GUIDE.md
  • frontend/.env.example

@HOKAGO-MEMORIES
HOKAGO-MEMORIES merged commit 59f9830 into develop Jun 24, 2026
1 check passed
@HOKAGO-MEMORIES
HOKAGO-MEMORIES deleted the docs/deployment-guide branch June 25, 2026 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant