Skip to content

Commit

Permalink
Merge pull request #218 from TEAMMatchDev/dev
Browse files Browse the repository at this point in the history
Batch 배포
  • Loading branch information
imenuuu authored Dec 7, 2023
2 parents cada0fd + 609165d commit f3bffb0
Show file tree
Hide file tree
Showing 251 changed files with 6,343 additions and 1,693 deletions.
26 changes: 26 additions & 0 deletions .ebextensions-aligo/01_set_up_swap.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
files:
"/home/ec2-user/setup_swap.sh":
mode: "000755"
owner: root
group: root
content: |
#!/bin/bash
# based on http://steinn.org/post/elasticbeanstalk-swap/

SWAPFILE=/var/swapfile
SWAP_MEGABYTES=2048

if [ -f $SWAPFILE ]; then
echo "Swapfile $SWAPFILE found, assuming already setup"
exit;
fi

/bin/dd if=/dev/zero of=$SWAPFILE bs=1M count=$SWAP_MEGABYTES
/bin/chmod 600 $SWAPFILE
/sbin/mkswap $SWAPFILE
/sbin/swapon $SWAPFILE

commands:
01setup_swap:
command: "bash setup_swap.sh"
cwd: "/home/ec2-user/"
26 changes: 26 additions & 0 deletions .ebextensions-dev/01_set_up_swap.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
files:
"/home/ec2-user/setup_swap.sh":
mode: "000755"
owner: root
group: root
content: |
#!/bin/bash
# based on http://steinn.org/post/elasticbeanstalk-swap/

SWAPFILE=/var/swapfile
SWAP_MEGABYTES=2048

if [ -f $SWAPFILE ]; then
echo "Swapfile $SWAPFILE found, assuming already setup"
exit;
fi

/bin/dd if=/dev/zero of=$SWAPFILE bs=1M count=$SWAP_MEGABYTES
/bin/chmod 600 $SWAPFILE
/sbin/mkswap $SWAPFILE
/sbin/swapon $SWAPFILE

commands:
01setup_swap:
command: "bash setup_swap.sh"
cwd: "/home/ec2-user/"
26 changes: 26 additions & 0 deletions .ebextensions-prod/01_set_up_swap.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
files:
"/home/ec2-user/setup_swap.sh":
mode: "000755"
owner: root
group: root
content: |
#!/bin/bash
# based on http://steinn.org/post/elasticbeanstalk-swap/

SWAPFILE=/var/swapfile
SWAP_MEGABYTES=2048

if [ -f $SWAPFILE ]; then
echo "Swapfile $SWAPFILE found, assuming already setup"
exit;
fi

/bin/dd if=/dev/zero of=$SWAPFILE bs=1M count=$SWAP_MEGABYTES
/bin/chmod 600 $SWAPFILE
/sbin/mkswap $SWAPFILE
/sbin/swapon $SWAPFILE

commands:
01setup_swap:
command: "bash setup_swap.sh"
cwd: "/home/ec2-user/"
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/🔨refactor_issue_temlate.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ assignees: ''
<!-- refactor/issue-47-->

### ✅ refactoring TODO
<!-- 리팩토링 튜두 -->
<!-- 리팩토링 투두 -->
- [ ]
4 changes: 1 addition & 3 deletions .github/ISSUE_TEMPLATE/🚀feture_issue_temlate.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: "\U0001F680FETURE_ISSUE_TEMLATE"
about: 기능 추가시에 적는 템플릿 입니다
title: "\U0001F680 [Feature]"
title: "\U0001F680 [feature]"
labels: ''
assignees: ''

Expand All @@ -11,7 +11,5 @@ assignees: ''
<!-- 이슈에 할당된 기능이 무엇인지 간략하게 한 줄로 적습니다 -->
## ✅ Todo
- [ ] 구현 내용 1
- [ ] 구현 내용 2
- [ ] 구현 내용 3
### 📚 Remarks
<!-- 기능 개발에 있어 비고사항이 있었다면 적기 -->
7 changes: 4 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
## 개요
## Pull Request
## 📌 개요 - 작업 브랜치
- close #issueNumber

## 작업사항
## ⚡️작업사항
- 내용을 적어주세요.

## 변경로직
## ♻️ 변경사항 (Optional)
- 내용을 적어주세요.
91 changes: 0 additions & 91 deletions .github/workflows/admin_api_ci_cd.yml

This file was deleted.

38 changes: 25 additions & 13 deletions .github/workflows/aligo_api_ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,53 +21,61 @@ jobs:
java-version: '11'
distribution: 'temurin'

- name: Set Environment - Common Yml
- name: Set Environment - Common Prod Yml
uses: microsoft/variable-substitution@v1
with:
files: ./Match-Common/src/main/resources/application-common.yml
env:
oauth.kakao.base-url: ${{ secrets.KAKAO_BASE_URL }}
oauth.kakao.base-url: ${{ secrets.KAKAO_PROD_BASE_URL }}
oauth.kakao.client-id: ${{ secrets.KAKAO_CLIENT }}
oauth.kakao.client-secret: ${{ secrets.KAKAO_SECRET }}
oauth.kakao.redirect-url: ${{ secrets.KAKAO_REDIRECT }}
oauth.kakao.redirect-url: ${{ secrets.KAKAO_PROD_REDIRECT }}
oauth.kakao.app-id: ${{ secrets.KAKAO_APP_ID }}
oauth.kakao.admin-key: ${{ secrets.KAKAO_ADMIN_KEY }}
jwt.secret: ${{ secrets.JWT_SECRET_KEY }}
jwt.refresh: ${{ secrets.JWT_REFRESH_KEY }}
oauth.naver.secret: ${{ secrets.NAVER_SECRET }}
oauth.naver.client: ${{ secrets.NAVER_CLIENT }}
oauth.naver.redirect-url: ${{ secrets.NAVER_REDIRECT}}
oauth.naver.redirect-url: ${{ secrets.NAVER_PROD_REDIRECT}}
sms.secret: ${{ secrets.SMS_SECRET_KEY }}
sms.api: ${{ secrets.SMS_API_KEY }}
sms.sender: ${{ secrets.SMS_SENDER }}
nice.secret: ${{ secrets.NICE_SECRET_KEY}}
nice.client: ${{ secrets.NICE_CLIENT_KEY }}
nice.url: ${{ secrets.NICE_DEV_URL}}
nice.secret: ${{ secrets.NICE_PROD_SECRET_KEY}}
nice.client: ${{ secrets.NICE_PROD_CLIENT_KEY }}
nice.url: ${{ secrets.NICE_PROD_URL}}
aws.access-key: ${{ secrets.AWS_S3_ACCESS_KEY }}
aws.secret-key: ${{ secrets.AWS_S3_SECRET_KEY }}
aws.s3.bucket: ${{ secrets.AWS_S3_BUCKET }}
aws.s3.bucket-url: ${{ secrets.AWS_S3_BASE_URL }}
discord.webhook.error: ${{ secrets.DISCORD_WEBHOOK_ERROR}}
discord.webhook.alert: ${{ secrets.DISCORD_WEBHOOK_ALERT }}
server.host: ${{ secrets.DEV_SERVER_HOST}}
web.return.url: ${{ secrets.PROD_RETURN_URL }}
match.aligo.url: ${ secrets.MATCH_ALIGO_URL }}
server.host: ${{ secrets.PROD_SERVER_HOST}}
spring.password: ${{ secrets.APP_PASSWORD}}
aligo.username: ${{ secrets.ALIGO_USERNAME }}
aligo.key: ${{ secrets.ALIGO_KEY }}
web.return.url: ${{ secrets.DEV_RETURN_URL }}
match.aligo.url: ${ secrets.MATCH_ALIGO_URL }}
portone.code: ${{ secrets.PORTONE_CODE }}
portone.key: ${{ secrets.PORTONE_KEY }}
portone.secret: ${{ secrets.PORTONE_SECRET }}
portone.billmid: ${{ secrets.PROD_PORTONE_BILL_MID}}
private.aes.key: ${{ secrets.AES_PRIVATE_KEY }}
apple.bundle.id: ${{ secrets.APPLE_BUNDLE_ID }}
apple.team.id: ${{ secrets.APPLE_TEAM_ID }}
aligo.sender-key: ${{ secrets.KAKAO_SENDER_KEY }}


- name: Set Environment Domain - Domain Prod Yml
uses: microsoft/variable-substitution@v1
with:
files: ./Match-Domain/src/main/resources/application-domain-prod.yml
env:
spring.datasource.url: ${{ secrets.PROD_DB_URL_HOST }}
spring.datasource.username: ${{ secrets.AWS_DB_USER_NAME }}
spring.datasource.password: ${{ secrets.AWS_DB_PASSWORD }}
spring.datasource.master.hikari.jdbc-url: ${{ secrets.PROD_DB_URL_HOST }}
spring.datasource.master.hikari.username: ${{ secrets.AWS_DB_USER_NAME }}
spring.datasource.master.hikari.password: ${{ secrets.AWS_DB_PASSWORD }}
spring.datasource.slave.hikari.jdbc-url: ${{ secrets.PROD_SLAVE_URL_HOST }}
spring.datasource.slave.hikari.username: ${{ secrets.AWS_DB_USER_NAME }}
spring.datasource.slave.hikari.password: ${{ secrets.AWS_DB_PASSWORD }}
spring.redis.host : ${{ secrets.REDIS_PROD_HOST }}

- name: create-fcm-json
Expand All @@ -78,6 +86,10 @@ jobs:
json: ${{ secrets.FCM_JSON }}
dir: "Match-Common/src/main/resources/"

- name: Create Auth Key File
run: |
echo "${{ secrets.AUTH_KEY }}" > ./Match-Common/src/main/resources/AuthKey_74JQ8SGRU2.p8
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
shell: bash
Expand Down
Loading

0 comments on commit f3bffb0

Please sign in to comment.