Skip to content

Commit

Permalink
Merge pull request #18 from Central-MakeUs/deploy/cd-workflow-eb
Browse files Browse the repository at this point in the history
deploy: Elastic Beanstalk 배포 스크립트 추가
  • Loading branch information
leeeeeyeon authored Jan 12, 2024
2 parents 68b69a7 + 85bcbeb commit d171f50
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/packy-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,29 @@ jobs:

- name: Build with Gradle
run: ./gradlew -Pdev clean jib -x test

- name: Get current time
uses: 1466587594/get-current-time@v2
id: current-time
with:
format: YYYYMMDD_HH-mm-ss
utcOffset: "+09:00"

- name: Generate deployment package
run: |
mkdir -p deploy/.platform/nginx/conf.d
cp Dockerrun.aws.json deploy/Dockerrun.aws.json
cp .platform/nginx/conf.d/proxy.conf deploy/.platform/nginx/conf.d/proxy.conf
cd deploy && zip -r deploy.zip .
- name: Beanstalk Deploy
uses: einaregilsson/beanstalk-deploy@v14
with:
aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
application_name: packy-dev-beanstalk
environment_name: Packy-dev-beanstalk-env
version_label: earth-docker-${{steps.current-time.outputs.formattedTime}}
region: ap-northeast-2
deployment_package: deploy/deploy.zip
wait_for_environment_recovery: 200
2 changes: 2 additions & 0 deletions .platform/nginx/conf.d/proxy.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# nginx의 기본 업로드 제한 해제
client_max_body_size 0;
13 changes: 13 additions & 0 deletions Dockerrun.aws.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"AWSEBDockerrunVersion": "1",
"Image": {
"Name": "714646531644.dkr.ecr.ap-northeast-2.amazonaws.com/packy-dev:latest",
"Update": "true"
},
"Ports": [
{
"ContainerPort": "8081",
"HostPort": "8081"
}
]
}

0 comments on commit d171f50

Please sign in to comment.