Skip to content

Commit

Permalink
Merge branch 'tukcomCD2024:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
ksh-g001 authored Jan 23, 2024
2 parents 08d06dc + af9196c commit eabe907
Show file tree
Hide file tree
Showing 89 changed files with 253 additions and 79 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ defaults:
shell: bash

env:
AWS_S3_BUCKET: howabouttrip-backend-bucket
AWS_CODE_DEPLOY_APPLICATION: HowAboutTrip-Backend-CD
AWS_CODE_DEPLOY_GROUP: HowAboutTrip-Backend-CD-Group
AWS_S3_BUCKET: howabouttrip-bucket
AWS_CODE_DEPLOY_APPLICATION: HowAboutTrip-CD
AWS_CODE_DEPLOY_GROUP: HowAboutTrip-CD-Group

jobs:
deploy:
Expand All @@ -36,6 +36,13 @@ jobs:
working-directory: ./backend
run: ./gradlew build test

- name: Setup MySQL
uses: mirromutth/[email protected]
with:
mysql database: 'trip'
mysql user: ${DB_USERNAME}
mysql password: ${DB_PASSWORD}

- name: Configure AWS credential
uses: aws-actions/configure-aws-credentials@v1
with:
Expand All @@ -44,7 +51,7 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: Upload to S3
run: aws deploy push --application-name ${{ env.AWS_CODE_DEPLOY_APPLICATION }} --ignore-hidden-files --s3-location s3://$AWS_S3_BUCKET/HowAboutTrip-Backend-EC2/$GITHUB_SHA.zip --source .
run: aws deploy push --application-name ${{ env.AWS_CODE_DEPLOY_APPLICATION }} --ignore-hidden-files --s3-location s3://$AWS_S3_BUCKET/HowAboutTrip-EC2/$GITHUB_SHA.zip --source .

- name: Code Deploy to EC2
run: aws deploy create-deployment --application-name ${{ env.AWS_CODE_DEPLOY_APPLICATION }} --deployment-config-name CodeDeployDefault.AllAtOnce --deployment-group-name ${{ env.AWS_CODE_DEPLOY_GROUP }} --s3-location bucket=$AWS_S3_BUCKET,key=HowAboutTrip-Backend-EC2/$GITHUB_SHA.zip,bundleType=zip
run: aws deploy create-deployment --application-name ${{ env.AWS_CODE_DEPLOY_APPLICATION }} --deployment-config-name CodeDeployDefault.AllAtOnce --deployment-group-name ${{ env.AWS_CODE_DEPLOY_GROUP }} --s3-location bucket=$AWS_S3_BUCKET,key=HowAboutTrip-EC2/$GITHUB_SHA.zip,bundleType=zip

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file.
Empty file.
Empty file.
Empty file.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file.
Empty file.
Empty file.
Empty file.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file.
90 changes: 80 additions & 10 deletions .idea/sonarlint/issuestore/index.pb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
90 changes: 80 additions & 10 deletions .idea/sonarlint/securityhotspotstore/index.pb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 4 additions & 12 deletions appspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,11 @@ version: 0.0
os: linux

files:
- source: /
destination: /home/ubuntu/spring-github-action
overwrite: yes

permissions:
- object: /
owner: ubuntu
group: ubuntu
- source: /
destination: /home/ubuntu/app # 인스턴스에서 파일이 저장될 위치

hooks:
AfterInstall:
- location: scripts/stop.sh
- location: scripts/deploy.sh
timeout: 60
ApplicationStart:
- location: scripts/start.sh
timeout: 60
runas: ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,11 @@ public class MemberController {

private final MemberService memberService;

/**
* test API
*/
@GetMapping("/test")
public ResponseEntity<String> privateEndpoint() {
// System.out.println("이메일 출력 = " + customUserDetails.getUsername());
// String member = customUserDetails.getUsername();
return ResponseEntity.ok("hi");
public String testEndpoint() {
return "Test endpoint response";
}



/**
* 로그인 API
*/
Expand Down
4 changes: 3 additions & 1 deletion backend/src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
server:
port: 5000
servlet:
context-path: /

spring:
jpa:
Expand All @@ -15,4 +17,4 @@ spring:
password: ${DB_PASSWORD}

jwt:
secret : ${JWT_SECRET_KEY}
secret : ${JWT_SECRET_KEY}
Loading

0 comments on commit eabe907

Please sign in to comment.