From d7b6cee938bac9313f59f818bccaca83b810e660 Mon Sep 17 00:00:00 2001 From: yel-m Date: Sun, 5 May 2024 19:42:02 +0900 Subject: [PATCH 1/3] =?UTF-8?q?chore=20:=20appspec.yml=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- appspec.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 appspec.yml diff --git a/appspec.yml b/appspec.yml new file mode 100644 index 0000000..9a2ee40 --- /dev/null +++ b/appspec.yml @@ -0,0 +1,12 @@ +version: 0.0 +os: linux +files: + - source: / + destination: /home/ec2-user/happinessql/ # 프로젝트 이름 + overwrite: yes + +permissions: + - object: / + pattern: "**" + owner: ec2-user + group: ec2-user \ No newline at end of file From 79f2cab40ad54b5b5e5a5d1b132049396aede7aa Mon Sep 17 00:00:00 2001 From: yel-m Date: Sun, 5 May 2024 19:42:58 +0900 Subject: [PATCH 2/3] =?UTF-8?q?chore=20:=20codedeploy=20=EC=8A=A4=ED=83=AD?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cicd.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index cd665c2..71d0c40 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -60,4 +60,7 @@ jobs: aws-region: ${{ secrets.AWS_REGION }} - name: Upload to S3 - run: aws s3 cp --region ap-northeast-2 ./$GITHUB_SHA.zip s3://$S3_BUCKET_NAME/$PROJECT_NAME/$GITHUB_SHA.zip \ No newline at end of file + run: aws s3 cp --region ap-northeast-2 ./$GITHUB_SHA.zip s3://$S3_BUCKET_NAME/$PROJECT_NAME/$GITHUB_SHA.zip + + - name: Code Deploy + run: aws deploy create-deployment --application-name happinessql-deploy --deployment-config-name CodeDeployDefault.AllAtOnce --deployment-group-name develop --s3-location bucket=$S3_BUCKET_NAME,bundleType=zip,key=$PROJECT_NAME/$GITHUB_SHA.zip \ No newline at end of file From d6cda040f3a6b5e1014e8b6a8520c186e70075ec Mon Sep 17 00:00:00 2001 From: yel-m Date: Sun, 5 May 2024 19:53:44 +0900 Subject: [PATCH 3/3] =?UTF-8?q?chore=20:=20nginx=20=EA=B4=80=EB=A0=A8=20?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .platform/conf.d/client_max_body_size.conf | 1 - .platform/nginx.conf | 63 ---------------------- 2 files changed, 64 deletions(-) delete mode 100644 .platform/conf.d/client_max_body_size.conf delete mode 100644 .platform/nginx.conf diff --git a/.platform/conf.d/client_max_body_size.conf b/.platform/conf.d/client_max_body_size.conf deleted file mode 100644 index 8e8277e..0000000 --- a/.platform/conf.d/client_max_body_size.conf +++ /dev/null @@ -1 +0,0 @@ -client_max_body_size 200M; \ No newline at end of file diff --git a/.platform/nginx.conf b/.platform/nginx.conf deleted file mode 100644 index 612092e..0000000 --- a/.platform/nginx.conf +++ /dev/null @@ -1,63 +0,0 @@ -user nginx; -error_log /var/log/nginx/error.log warn; -pid /var/run/nginx.pid; -worker_processes auto; -worker_rlimit_nofile 33282; - -events { - use epoll; - worker_connections 1024; - multi_accept on; -} - -http { - include /etc/nginx/mime.types; - default_type application/octet-stream; - - - log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - '$status $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for"'; - - include conf.d/*.conf; - - map $http_upgrade $connection_upgrade { - default "upgrade"; - } - - upstream springboot { - server 127.0.0.1:8080; - keepalive 1024; - } - - server { - listen 80 default_server; - listen [::]:80 default_server; - - location / { - proxy_pass http://springboot; - # CORS 관련 헤더 추가 - add_header 'Access-Control-Allow-Origin' '*'; - add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS'; - add_header 'Access-Control-Allow-Headers' 'Authorization, Content-Type'; - proxy_http_version 1.1; - proxy_set_header Connection $connection_upgrade; - proxy_set_header Upgrade $http_upgrade; - - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - } - - access_log /var/log/nginx/access.log main; - - client_header_timeout 60; - client_body_timeout 60; - keepalive_timeout 60; - gzip off; - gzip_comp_level 4; - - # Include the Elastic Beanstalk generated locations - include conf.d/elasticbeanstalk/healthd.conf; - } -} \ No newline at end of file