From 160939d363cb1a2f9f3de86db442037f278dea5c Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Fri, 16 Feb 2024 02:39:44 +0000 Subject: [PATCH 1/5] [autofix.ci] apply automated fixes --- bun.lockb | Bin 88450 -> 88450 bytes yarn.lock | 156 +++++++++++++++++++++++++++--------------------------- 2 files changed, 78 insertions(+), 78 deletions(-) diff --git a/bun.lockb b/bun.lockb index 24e40f082fbe2cd71c85bedb5f4a421912d0b129..abf0f427ad5ef66d7d396838850aac5303bb985d 100755 GIT binary patch delta 1708 zcmZ9I3pkT|9LM*zxzn)BMn%KOVRD zmrsgTpTn}2etC&UVHA^nFIM2SsL=R(lmnAOZPiS1ks(WXAj~^=WVHBShv(jU9O`tk zwRc+bnQ(-~{@RN5a2-s2Hef}3mOs!jd-uHt)0O6|NUHY-UC@bYP1f#FAfB#?Dp4f| zcyyZ26-xybmcgmip)~uihjY4<%=X^dcLAiPbeeuVm06PZM`t%O^sO@G_U=Ph!`!Z~ z9*r_88K>*uyUO|{@Pw-4%Nq>c7Pwt?$D;JxL&e9i2Yg#inOP*R9ihQFTjujn^^6Vh{)ffIz~DyeY(ce>@PT7h;-q zz(=puqoF0vW#+0GgphVsj`Ju*}kn#Xa6uK2sgzbIV=dn{# zZ=tbZ`p@4XUT#gNpzgFsA}R8i;5BgpcN_$Q}i{>rLbO9-Sl&Oym6 zo}HnM&AA@jXP9X?dI{ZZFFQJUDr83)3@28;#sXgJawzMX*@EX7b2*bqPetTosuCiW zD*Ka37MfG{<5y~E&v+&q|4x!O#rW-Nqvb@v1+wzjycCw}7oS+@I=YpY*3z-Iy(caf za0v(X(Aa(MtHVf}!4P9k678v;#*JlopxrXlqTPB0oyGW0j`v0oML1Jui^j9dJbjJb zgAPSrE?vnB`S2w@hJXtm2#)fXcz2_5pz?0sm4B2iSvCtF%f=?A+Q{GqJ$vqo9iH8? zXVVS>+OU)0w;Ru&n>TuXJI?KsW|D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y`?S0Sdc?O2 z{|D|+b0V?)Lu-!v8V*@!-PUSjC?qkGmDI~DT3*AgYAl7~Emhq;%KJ#pbNZ!^xEa$P zMu~NKP6;bIxf~?lWcBW(_;a(MorP9-WwOZ_H|$kV*5J+V7`4VyiE}fab)h28H=`9Z zbW&vq#r-TbT$L%lFZ(w_0--)(Vc!ac>{Hu0;Qc^6DF-@x02@1_+-x3}Itm0at4 zqR$59j-`-0>;2rkE2qy8_mGzQAsugQY!Mv!csZ?T@|v>>O_KD1^b0*N^BPO**HPMn zBwD*pn@NRSv#gZQUTJn;B>Kznat^BbI#_pIy^=E&{>Y(d{y)3bJ46ZE85)-Mr&E}@ zc(FpUkJLb-ScpexDjbeB*OZS?l+b-V>bZ65VUHz_Doker_PY>Fq{q(vPSMe@wQath z3a;cCXT&=bNnu~2roZfH*)y`K#lP6-gFYzsX~68Fo0ml`?M*#>a_nvBh|k^+Cc|1T z+V&b&>U8dr_C+zX67HPSYx`XNzlAte{+U}T2-yX<;PFGJFAH_L2jFj5JJ`*hyj1Xz zVH1>ek$3mr&#tO>Ud%1bPo~|M5yijQ-esbWxS)xzFSj3>SA64-f;nfCT^OQA^#YCc zj04Gs;2|`y5kO5DKor0OG5{}t{IUjIDFZM9*+UsHDu8veKoyW-Cj+1e&&mP?IkN7l zV?XH|>gwz2>l_X^8SrDYE}7h*DhCn)zZYN%@NfYZh{8|g0r}ft6Ksb8V(<= 16.8.0 || 17.x.x || ^18.0.0-0", react@^18.0.0, react@^18.2.0, react@canary: - version "18.3.0-canary-f0e808e5b-20240214" - resolved "https://registry.npmjs.org/react/-/react-18.3.0-canary-f0e808e5b-20240214.tgz" - integrity sha512-LE0h6oDDPUCsl9CXmDyembvCNQTKKQ28HbQku4F7pYW/Pa8DST/YaMOAQSBzNUAS+6eNaoEgSkypQ68ho1iqHw== +"react@18.3.0-canary-2e470a788-20240214", "react@>= 16.8.0 || 17.x.x || ^18.0.0-0", react@^18.0.0, react@^18.2.0, react@canary: + version "18.3.0-canary-2e470a788-20240214" + resolved "https://registry.npmjs.org/react/-/react-18.3.0-canary-2e470a788-20240214.tgz" + integrity sha512-yAKIu2SdFpKjw21QaLzT6hDLCHBBKbSq/28yLraOAUR/y5jXxu6u5CzKU5lRIIy2ZAB7MnO8gjHRH39ssnOkJw== dependencies: loose-envify "^1.1.0" react-dom@^18.0.0, react-dom@^18.2.0, react-dom@canary: - version "18.3.0-canary-f0e808e5b-20240214" - resolved "https://registry.npmjs.org/react-dom/-/react-dom-18.3.0-canary-f0e808e5b-20240214.tgz" - integrity sha512-6oUH75HV23vOblZ49a8Q9hLeaRwjNnwRJWt11oYARwFTmUCuw+Kp/B+jpR5ZCJUPAfBVqpNo/VA4NwVb3VNkkA== + version "18.3.0-canary-2e470a788-20240214" + resolved "https://registry.npmjs.org/react-dom/-/react-dom-18.3.0-canary-2e470a788-20240214.tgz" + integrity sha512-NC6NkyJxgF45vRqqPthcIl3ZPgc6jKH3bzyVG99pWV6DL9RM+y81qaRXm3PK0K96BdwKB+HkIkzKlZe8LYNSFQ== dependencies: loose-envify "^1.1.0" - scheduler "0.24.0-canary-f0e808e5b-20240214" + scheduler "0.24.0-canary-2e470a788-20240214" react-is@^17.0.1: version "17.0.2" @@ -1287,10 +1287,10 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" -"scheduler@0.24.0-canary-f0e808e5b-20240214": - version "0.24.0-canary-f0e808e5b-20240214" - resolved "https://registry.npmjs.org/scheduler/-/scheduler-0.24.0-canary-f0e808e5b-20240214.tgz" - integrity sha512-atwW6jzZNABeMiSZqarJDu/Tq5df/ewah//OfAEoddqYzoWZx95PPrDyDvbNjDuDlDLcNBFxcXGvs9l472mE0w== +"scheduler@0.24.0-canary-2e470a788-20240214": + version "0.24.0-canary-2e470a788-20240214" + resolved "https://registry.npmjs.org/scheduler/-/scheduler-0.24.0-canary-2e470a788-20240214.tgz" + integrity sha512-9KARZ5unFpeX2YVL8kWQz4E/HqghewAoI2yhXITKpIVNyM8ZbeIklaUcQpFuVJ39T3M5pOGhMl3Mp9YNXWOsXA== dependencies: loose-envify "^1.1.0" From 136b9a16b611c5e55398dd127052c81d77fbf45c Mon Sep 17 00:00:00 2001 From: Marukome0743 Date: Fri, 16 Feb 2024 12:01:14 +0900 Subject: [PATCH 2/5] =?UTF-8?q?=E2=99=BB=EF=B8=8Fci:=20add=20lambda=20CI/C?= =?UTF-8?q?D=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/lambda.yml | 53 ++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/lambda.yml diff --git a/.github/workflows/lambda.yml b/.github/workflows/lambda.yml new file mode 100644 index 0000000..ca7c01e --- /dev/null +++ b/.github/workflows/lambda.yml @@ -0,0 +1,53 @@ +name: Deploy to Amazon Lambda + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +on: + push: + branches: + - main + paths: + - "app/**" + - "public/**" + - "bun.lockb" + - "package.json" + - "yarn.lock" + - "*config.*" + workflow_dispatch: + +env: + AWS_REGION: ap-northeast-1 + ECR_REPOSITORY: rasnage + LAMBDA_FUNCTION_NAME: rasnage + +jobs: + deploy: + if: github.repository == 'OpenUp-LabTakizawa/rasnage' + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: ${{ env.AWS_REGION }} + + - name: Login to Amazon ECR + id: login-ecr + uses: aws-actions/amazon-ecr-login@v2 + + - name: Build, tag, and push image to Amazon ECR + id: build-image + env: + ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} + IMAGE_TAG: ${{ github.sha }} + run: | + docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . + docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG + aws lambda update-function-code --function-name $LAMBDA_FUNCTION_NAME --image-uri $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG From dc48d7d9838d7118504c5b475a7c4e45cebe107e Mon Sep 17 00:00:00 2001 From: Marukome0743 Date: Fri, 16 Feb 2024 12:01:14 +0900 Subject: [PATCH 3/5] =?UTF-8?q?=F0=9F=90=B3docker:=20add=20lambda=20web=20?= =?UTF-8?q?adapter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index a7c4f48..0a2f982 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:21.6.1 as base +FROM node:21.6.2 as base WORKDIR /app RUN npm install -g bun @@ -15,13 +15,15 @@ RUN bun run build FROM oven/bun:canary-distroless WORKDIR /usr/src/app +COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.8.1 /lambda-adapter /opt/extensions/lambda-adapter + ENV NODE_ENV=production COPY --from=builder /app/public ./public COPY --from=builder --chown=nonroot:nonroot /app/.next/standalone ./ COPY --from=builder /app/.next/static ./.next/static USER nonroot -EXPOSE 80 -ENV PORT 80 +EXPOSE 3000 +ENV PORT 3000 ENV HOSTNAME "0.0.0.0" CMD ["run", "server.js"] From 9d8b5974c635cc26487aa3757c6b2dc12cf81f4b Mon Sep 17 00:00:00 2001 From: Marukome0743 Date: Fri, 16 Feb 2024 12:02:41 +0900 Subject: [PATCH 4/5] =?UTF-8?q?=F0=9F=90=B3docker:=20bump=20node=20image?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f8326ec..62a6b33 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "@happy-dom/global-registrator": "^13.3.8", "@testing-library/react": "^14.2.1", "@types/bun": "^1.0.5", - "@types/node": "^20.11.18", + "@types/node": "^20.11.19", "@types/react": "^18.2.55", "@types/react-dom": "^18.2.19", "postcss": "^8.4.35", From 8f285013a0862b3ebd458da0bb90637ac46c6b00 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Fri, 16 Feb 2024 03:03:22 +0000 Subject: [PATCH 5/5] [autofix.ci] apply automated fixes --- bun.lockb | Bin 88450 -> 88450 bytes yarn.lock | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/bun.lockb b/bun.lockb index abf0f427ad5ef66d7d396838850aac5303bb985d..3e331a6967c57994a5f045e1b89d9561df490dd0 100755 GIT binary patch delta 19 acmZqL%-Xb>wP6cmvk;@@_7)+=e{KLtLwP6cmvk;@j_7)+=e{KLtJqHQ^ diff --git a/yarn.lock b/yarn.lock index a36030f..66dfa28 100644 --- a/yarn.lock +++ b/yarn.lock @@ -266,7 +266,7 @@ dependencies: bun-types "1.0.26" -"@types/node@*", "@types/node@^20.11.18", "@types/node@~20.11.3": +"@types/node@*", "@types/node@^20.11.19", "@types/node@~20.11.3": version "20.11.19" resolved "https://registry.npmjs.org/@types/node/-/node-20.11.19.tgz" integrity sha512-7xMnVEcZFu0DikYjWOlRq7NTPETrm7teqUT2WkQjrTIkEgUyyGdWsj/Zg8bEJt5TNklzbPD1X3fqfsHw3SpapQ==