-
Notifications
You must be signed in to change notification settings - Fork 0
[26.04.04 / TASK-268] Chore - 프로덕션용 환경변수 파일 .env.prod 추가
#53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ooheunda
wants to merge
3
commits into
main
Choose a base branch
from
chore/split-env
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,37 +1,37 @@ | ||
| PORT=8080 | ||
| ALLOWED_ORIGINS=http://localhost,http://localhost:3000,http://158.180.72.158,http://velog-dashboard.kro.kr,https://velog-dashboard.kro.kr,http://velog.io,https://velog.io | ||
| NODE_ENV="development" | ||
| ALLOWED_ORIGINS=http://localhost,http://localhost:3000 | ||
| NODE_ENV=development | ||
|
|
||
| # 토큰 단방향 암호화 전용 핵심 키 | ||
| AES_KEY_0=13ccb93c17a8d6e49ba3c5d91e3a6f45 | ||
| AES_KEY_1=76e2a34bf23cd45876bc91e6a87d3f22 | ||
| AES_KEY_2=93a4d7e6b34ac8f1092fd5e87a93bc56 | ||
| AES_KEY_3=b87f6c34d92fa17e3b2a67e58c93fa56 | ||
| AES_KEY_4=27e3b8f67c4a12d8f93a6b17d4e58fa9 | ||
| AES_KEY_5=6b83c9e21a7d48fa3f9b27e45c8a6f12 | ||
| AES_KEY_6=81f92ab73c4e59d8a67f83b21d6e4c53 | ||
| AES_KEY_7=d87b61e9f34a2c85f19a7e53c6d8f21a | ||
| AES_KEY_8=7c58f92ae1d3b67a4c29f8b36e17d4f9 | ||
| AES_KEY_9=a93b4f7e2c6d81a7f5c3b2e89d47f612 | ||
| AES_KEY_0= | ||
| AES_KEY_1= | ||
| AES_KEY_2= | ||
| AES_KEY_3= | ||
| AES_KEY_4= | ||
| AES_KEY_5= | ||
| AES_KEY_6= | ||
| AES_KEY_7= | ||
| AES_KEY_8= | ||
| AES_KEY_9= | ||
|
|
||
| # Database | ||
| DATABASE_NAME=vd2 | ||
| POSTGRES_USER=vd2 | ||
| POSTGRES_PASSWORD=vd2 | ||
| DATABASE_NAME=postgres | ||
| POSTGRES_USER= | ||
| POSTGRES_PASSWORD= | ||
| POSTGRES_HOST=localhost | ||
| POSTGRES_PORT=5432 | ||
|
|
||
| # Cache (redis) | ||
| REDIS_HOST=localhost | ||
| REDIS_PORT=6379 | ||
| REDIS_PASSWORD=notion-check-plz | ||
| REDIS_PASSWORD= | ||
| REDIS_DB=0 | ||
| REDIS_KEY_PREFIX=vd2: | ||
| CACHE_DEFAULT_TTL=300 | ||
|
|
||
| # Slack Notification | ||
| SLACK_WEBHOOK_URL=https://hooks.slack.com/services | ||
| SLACK_WEBHOOK_URL= | ||
|
|
||
| # Sentry Hook | ||
| SENTRY_CLIENT_SECRET=374708bedd34ae70f814471ff24db7dedc4b9bee06a7e8ef9255a4f6c8bd9049 # 실제 키를 사용하세요 | ||
| SENTRY_DSN=https://ingest.us.sentry.io | ||
| SENTRY_CLIENT_SECRET= | ||
| SENTRY_DSN= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,7 @@ SYSTEM_DESIGN.md | |
|
|
||
| # 환경 변수 및 인증 정보 | ||
| .env | ||
| .env.prod | ||
| .env.local | ||
| .env.*.local | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: Check-Data-Out/velog-dashboard-v2-api
Length of output: 1799
env_file파일명이 CI/CD와 불일치하여 배포 시 환경변수 로드 실패를 야기합니다.docker-compose.yml은
.env.prod를 요구하지만, .github/workflows/api-ci-cd.yaml의 "Create .env file" 단계(라인 53-73)는.env파일만 생성합니다. 이 불일치로 컨테이너가 필수 환경변수 없이 올라올 수 있습니다.다음 중 하나를 수행하세요:
.env.prod파일을 생성하거나env_file을.env로 변경하세요🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#52 머지후 이어가는게 나을 것 같습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ooheunda, 이해했습니다! PR#52가먼저 머지된 후 CI/CD 워크플로우에서.env.prod를 생성하도록 수정되면 이 불일치가 자연스럽게 해소될 것 같습니다.#52머지 이후에 해당 부분을 다시 확인해 주세요. 👍🧠 Learnings used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
근데 생각해보니까 CI에서 prod값이 필요하지 않습니다. (docker compose로 서버를 실행하지 않고 코드 검사만함) 그냥 냅둬도 될 것 같아요.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ooheunda, 좋은 설명 감사합니다! CI에서docker compose로 서버를 실행하지 않고 코드 검사만 수행한다면,docker-compose.yml의env_file설정은 CI와 무관하므로 지적한 불일치 문제는 실제로 해당되지 않습니다. 현재 상태로 유지하셔도 됩니다. 🐇( ˶ᵔ ᵕ ᵔ˶ )
✏️ Learnings added
🧠 Learnings used