Skip to content

hrgd-CDC/hg-CDC-team

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

CDC(์”จ๋‹ค์”จ) - ๋…ธ๋ž‘๋กœ๋‹น ๐ŸŒป

ํ•ด์ปค๊ทธ๋ผ์šด๋“œ ํ•ด์ปคํ†ค์— ์ฐธ์—ฌํ•˜๋Š” CDC(์”จ๋‹ค์”จ)ํŒ€์˜ ๋…ธ๋ž‘๋กœ๋‹น ๐ŸŒป์ž…๋‹ˆ๋‹ค.

์ฐธ๊ณ  ๋ฌธ์„œ

์•„๋ž˜ ๋‘ ๋งํฌ๋Š” ํ•ด์ปคํ†ค์—์„œ ์•ฑ์„ ๊ฐœ๋ฐœํ•˜๋ฉด์„œ ์ฐธ๊ณ ํ•  ๋งŒํ•œ ๋ฌธ์„œ๋“ค์ž…๋‹ˆ๋‹ค. ์ด ๋ฌธ์„œ๋“ค์—์„œ ์–ธ๊ธ‰ํ•œ ์„œ๋น„์Šค ์ด์™ธ์—๋„ ๋” ๋งŽ์€ ์„œ๋น„์Šค๋“ค์ด PaaS, SaaS, ์„œ๋ฒ„๋ฆฌ์Šค ํ˜•ํƒœ๋กœ ์ œ๊ณต๋˜๋‹ˆ ์ฐธ๊ณ ํ•˜์„ธ์š”.

์ œํ’ˆ/์„œ๋น„์Šค ์†Œ๊ฐœ

์ œํ’ˆ/์„œ๋น„์Šค ์†Œ๊ฐœ ๋ณด๊ธฐ

์˜คํ”ˆ ์†Œ์Šค ๋ผ์ด์„ผ์Šค

์˜คํ”ˆ์†Œ์Šค ๋ผ์ด์„ผ์Šค ๋ณด๊ธฐ

์„ค์น˜ ๋ฐฉ๋ฒ•

์‚ฌ์ „ ์ค€๋น„ ์‚ฌํ•ญ

  • GitHub Account
  • Visual Studio Code
  • GitHub CLI
  • Azure CLI
  • Azure Developer CLI
  • Azure Account
  • Azure Resource Group
  • Node js
  • npm
  • pnpm
  • yarn

AI ๋ฐ DB ์‹œ์ž‘ํ•˜๊ธฐ

Note. Github Actions์™€ Bicep์„ ์‚ฌ์šฉํ•˜์˜€์Šต๋‹ˆ๋‹ค

  1. ์ด ๋ฆฌํฌ์ง€ํ† ๋ฆฌ๋ฅผ ํฌํฌํ•˜๊ณ  ๋‹ค์Œ ๋ช…๋ น์–ด๋กœ ํด๋ก ํ•ฉ๋‹ˆ๋‹ค.
$GITHUB_USERNAME = "{{์ž์‹ ์˜ GitHub ID}}"
git clone https://github.com/$GITHUB_USERNAME/hg-CDC-team.git
cd hg-CDC-team
  1. ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์—์ €๋ฅผ ํ”„๋กœ๋น„์ €๋‹ ํ•ฉ๋‹ˆ๋‹ค. (์œˆ๋„์šฐ ๊ธฐ์ค€)
$AZURE_ENV_NAME="CDC-team"
$AZURE_LOCATION="koreacentral"
$AZURE_RESOURCE_GROUP="rg-CDC-team"

az login
azd auth login
azd init -e $AZURE_ENV_NAME
azd env set AZURE_ENV_NAME $AZURE_ENV_NAME
azd env set AZURE_LOCATION $AZURE_LOCATION
azd env set AZURE_RESOURCE_GROUP $AZURE_RESOURCE_GROUP
azd config set alpha.resourceGroupDeployments on

# azd up์„ ํ•˜๊ธฐ์ „ ์ƒ์„ฑ๋œ azure.yamlํŒŒ์ผ์„ ์•„๋ž˜์™€ ๊ฐ™์ด ์ˆ˜์ •ํ•ด์ฃผ์„ธ์š”.
name: hg-CDC-team

infra:
  provider: "bicep"
  path: "infra"
  module: "main"

pipeline:
  provider: "github"

# Deploy
azd up
  1. ๋‹ค์Œ๊ณผ ๊ฐ™์ด github workflow ์‹œํฌ๋ฆฟ์„ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค. (์œˆ๋„์šฐ ๊ธฐ์ค€)
# AI Deploy
az webapp deployment list-publishing-profiles --name "$AZURE_ENV_NAME-ai" --resource-group $AZURE_RESOURCE_GROUP --xml > ai_publish_profile.xml

gh auth login
gh secret set AZURE_AI_APP_NAME --repo hackersground-kr/hg-CDC-team --body "${AZURE_ENV_NAME}-ai"
cat ai_publish_profile.xml | gh secret set AZURE_AI_WEBAPP_PUBLISH_PROFILE --repo hackersground-kr/hg-CDC-team
  1. ํฌํฌํ•œ ๋ฆฌํฌ์ง€ํ† ๋ฆฌ์˜ Github Push๋ฅผ ํ•ด Actions๋ฅผ ํ™œ์„ฑํ™” ํ•ด์ค๋‹ˆ๋‹ค.
git add .
git commit -m "initial commit"
git push origin main
  1. ๊นƒํ—ˆ๋ธŒ์— ์ ‘์†ํ•ด github actions workflow๋ฅผ ์‹คํ–‰์„ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค.

  2. ๋ฐฐํฌ๊ฐ€ ์™„๋ฃŒ๋ ๋•Œ๊นŒ์ง€ ๊ธฐ๋‹ค๋ฆฝ๋‹ˆ๋‹ค. (10๋ถ„ ๊ฐ€๋Ÿ‰ ์†Œ์š”๋ฉ๋‹ˆ๋‹ค.)

  3. ๋‹ค์Œ๊ณผ ๊ฐ™์ด ๋ฐฑ์—”๋“œ ๋ฐฐํฌ๋ฅผ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค.

iwr https://$AZURE_ENV_NAME-ai.azurewebsites.net/location

๋ฐฑ์—”๋“œ ์‹œ์ž‘ํ•˜๊ธฐ

  1. ๋ฐฑ์—”๋“œ ํด๋”๋กœ ์ด๋™ํ•ด์ค๋‹ˆ๋‹ค.
cd backend # ๊ฒฝ๋กœ์˜ ์œ ์˜ ํ•ด์ฃผ์„ธ์š”. (์ž์‹ ์˜ ํ˜„์žฌ ๊ฒฝ๋กœ์— ๋งž๊ฒŒ)
  1. pnpm install ๋ช…๋ น์–ด๋ฅผ ์ž…๋ ฅํ•ด์ค๋‹ˆ๋‹ค.
pnpm install
  1. .envํŒŒ์ผ ์„ค์ •ํ•˜๊ธฐ (๊ฐ’์„ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”.)
DB_HOST=
DB_PORT=
DB_USERNAME=
DB_PASSWORD=
DB_DATABASE=
JWT_SECRET=
JWT_ACCESS_TOKEN_EXPIRATION=
JWT_REFRESH_TOKEN_EXPIRATION=
CONNECTION_STRING=
  1. ๋ฐฑ์—”๋“œ๋ฅผ ๋กœ์ปฌ์—์„œ ์‹คํ–‰ํ•ด์ค๋‹ˆ๋‹ค.
pnpm start:dev
  1. ๊นƒํ—ˆ๋ธŒ ์•ก์…˜์—์„œ ์‚ฌ์šฉํ•  ์‹œํฌ๋ฆฟ์„ ์‚ฌ์ง„๊ณผ ๊ฐ™์ด ์„ค์ •ํ•ด์ค๋‹ˆ๋‹ค.
แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2024-08-27 แ„‹แ…ฉแ„Œแ…ฅแ†ซ 7 36 12
  1. ๊นƒํ—ˆ๋ธŒ ์•ก์…˜ ํŒŒ์ผ์ด ์ž‘์„ฑ๋˜์–ด์žˆ์œผ๋‹ˆ git push๋ฅผ ํ†ตํ•ด ์•ก์…˜์„ ๋Œ๋ฆฝ๋‹ˆ๋‹ค. แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2024-08-27 แ„‹แ…ฉแ„Œแ…ฅแ†ซ 7 38 43

    ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์„ฑ๊ณต๋œ ๋ชจ์Šต์„ ๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

ํ”„๋ก ํŠธ์—”๋“œ ์‹œ์ž‘ํ•˜๊ธฐ

  1. ํ”„๋ก ํŠธ์—”๋“œ ํด๋”๋กœ ์ด๋™ํ•ด์ค๋‹ˆ๋‹ค.

cd frontend # ๊ฒฝ๋กœ์˜ ์œ ์˜ ํ•ด์ฃผ์„ธ์š”. (์ž์‹ ์˜ ํ˜„์žฌ ๊ฒฝ๋กœ์— ๋งž๊ฒŒ)

  1. ํ™˜๊ฒฝ๋ณ€์ˆ˜๋ฅผ ์„ค์ •ํ•ด์ค๋‹ˆ๋‹ค.

REACT_APP_KAKAO_KEY=746c698dca1feb40e6d1748fc65304af # ๋งต ํ‚ค

  1. yarn ๋ช…๋ น์–ด๋ฅผ ์ž…๋ ฅํ•ด์ค๋‹ˆ๋‹ค.

yarn

  1. yarn ๋ช…๋ น์–ด๋ฅผ ์ด์šฉํ•ด ํ”„๋ก ํŠธ์—”๋“œ๋ฅผ ์‹œ์ž‘ํ•ด์ค๋‹ˆ๋‹ค.

yarn start # ๋กœ์ปฌ์—์„œ ์ž˜ ์‹คํ–‰๋˜๋Š”์ง€ ํ™•์ธ ํ•ด์ฃผ์„ธ์š”.

  1. ๋กœ์ปฌ์—์„œ ์ž˜ ์‹คํ–‰๋œ๋‹ค๋ฉด ๋ฐฐํฌ๋‹จ๊ณ„๋กœ ๋„˜์–ด๊ฐ‘๋‹ˆ๋‹ค
แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2024-08-27 แ„‹แ…ฉแ„Œแ…ฅแ†ซ 12 37 42

Azure Portal์— ์ ‘์†ํ•ด App Service๋ฅผ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.

แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2024-08-27 แ„‹แ…ฉแ„Œแ…ฅแ†ซ 12 39 05

App Service์—์„œ ๋งŒ๋“ค๊ธฐ > "์›น ์•ฑ" ์„ ์„ ํƒํ•ด์ค๋‹ˆ๋‹ค. แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2024-08-27 แ„‹แ…ฉแ„Œแ…ฅแ†ซ 12 40 07

๋งŒ๋“ค๊ธฐ ๋ฉ”๋‰ด์—์„œ ์œ„ ์‚ฌ์ง„๊ณผ ๊ฐ™์ด ๋ฆฌ์†Œ์Šค ๊ทธ๋ฃน, ์ธ์Šคํ„ด์Šค ์ •๋ณด ๊ฒŒ์‹œ ๋“ฑ ๋ณ„ํ‘œ๊ฐ€ ์žˆ๋Š” ํ•„์ˆ˜์š”์†Œ๋ฅผ ์ž…๋ ฅํ•ด์ค๋‹ˆ๋‹ค. แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2024-08-27 แ„‹แ…ฉแ„Œแ…ฅแ†ซ 12 40 57 ๋‹ค์Œ์œผ๋กœ ํƒœ๊ทธ ๋ฅผ ์ž…๋ ฅํ•ด์ค๋‹ˆ๋‹ค. แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2024-08-27 แ„‹แ…ฉแ„Œแ…ฅแ†ซ 12 41 16

๋งˆ์ง€๋ง‰์œผ๋กœ ๊ฒ€ํ†  ํ›„ ๋งŒ๋“ค๊ธฐ๋ฅผ ๋ˆ„๋ฆ…๋‹ˆ๋‹ค. แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2024-08-27 แ„‹แ…ฉแ„Œแ…ฅแ†ซ 12 41 31

์ƒ์„ฑ์ด ๋ ๋•Œ ๊นŒ์ง€ ์ž ์‹œ ๊ธฐ๋‹ค๋ฆฐ ํ›„ Go to resource๋ฅผ ๋ˆŒ๋Ÿฌ์ค๋‹ˆ๋‹ค. (๋ฆฌ์†Œ์Šค ๋ณด๋Ÿฌ ๊ฐ€๊ธฐ)

แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2024-08-27 แ„‹แ…ฉแ„Œแ…ฅแ†ซ 12 41 41

๋‹ค์Œ์œผ๋กœ VSCode๋ฅผ ์—ด์–ด์ฃผ๊ณ  ์œ„์˜ 3๊ฐ€์ง€ ์ต์Šคํ…์…˜์„ ์„ค์น˜ ํ•ด์ค๋‹ˆ๋‹ค.

แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2024-08-27 แ„‹แ…ฉแ„Œแ…ฅแ†ซ 12 41 49

์„ค์น˜ ํ›„ Azure Icon์„ ๋ˆŒ๋Ÿฌ์„œ Sign in to Azure๋ฅผ ๋ˆŒ๋Ÿฌ์ค๋‹ˆ๋‹ค.

แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2024-08-27 แ„‹แ…ฉแ„Œแ…ฅแ†ซ 12 42 09

Azure์— ๋กœ๊ทธ์ธ ํ›„ AppService Icon์„ ๋ˆŒ๋Ÿฌ ์ฃผ๊ณ  ๋ฐฐํฌํ•  AppService๋ฅผ ์˜ค๋ฅธ์ชฝ ํด๋ฆญํ•ด Deploy to WEB App์„ ํด๋ฆญํ•ด ์ค๋‹ˆ๋‹ค. แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2024-08-27 แ„‹แ…ฉแ„Œแ…ฅแ†ซ 12 42 16

๋‹ค์Œ์œผ๋กœ Browser๋กœ ํด๋ฆญํ•ด์ฃผ๊ณ  "๋นŒ๋“œํ•œ" ๋ฆฌ์•กํŠธ ํ”„๋กœ์ ํŠธ์˜ "build ํด๋”" ๋ฅผ ํด๋ฆญํ•ด์ค๋‹ˆ๋‹ค.

แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2024-08-27 แ„‹แ…ฉแ„Œแ…ฅแ†ซ 12 42 56

๊ทธ ํ›„ Deploy์™€ Browse Website๋ฅผ ๋ˆŒ๋Ÿฌ ๋ฐฐํฌ ์ƒํƒœ๋ฅผ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค.

แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2024-08-27 แ„‹แ…ฉแ„Œแ…ฅแ†ซ 7 13 26

๋‹ค์Œ๊ณผ ๊ฐ™์ด ๋ฐฐํฌ๊ฐ€ ์ž˜ ๋œ ๋ชจ์Šต์„ ๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.


Releases

No releases published

Packages

No packages published

Languages