Skip to content

Commit

Permalink
CodeDeploy Test - Standalone build, pnpm
Browse files Browse the repository at this point in the history
CodeDeploy Test - Standalone build, pnpm
  • Loading branch information
jwo0o0 authored Nov 20, 2024
2 parents 90d1f81 + 21e98f6 commit c9cb008
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@ jobs:

- name: Make zip file
run: |
zip -qq -r nextjs-app-${{ github.sha }}.zip . -x ".git/*"
mkdir -p deploy_build/standalone
cp -r .next/standalone/* deploy_build/standalone/
cp -r .next/static deploy_build/standalone/.next/static
cp -r public deploy_build/standalone/public
cd deploy_build
zip -qq -r ../nextjs-app-${{ github.sha }}.zip .
shell: bash

- name: Clean old files from S3
Expand Down
5 changes: 2 additions & 3 deletions ecosystem.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ module.exports = {
apps: [
{
name: "sns_client", // ์•ฑ์˜ ์ด๋ฆ„
script: "pnpm", // Next.js ์Šคํฌ๋ฆฝํŠธ ๊ฒฝ๋กœ
args: "start", // Next.js ์•ฑ์„ ์‹œ์ž‘ํ•  ๋•Œ ์‚ฌ์šฉํ•  ์ธ์ˆ˜
cwd: "/home/ubuntu/deploy", // ํ”„๋กœ์ ํŠธ ๋ฃจํŠธ ๋””๋ ‰ํ† ๋ฆฌ
script: "server.js", // Next.js ์Šคํฌ๋ฆฝํŠธ ๊ฒฝ๋กœ
cwd: "/home/ubuntu/deploy/standalone", // standsalone ๋””๋ ‰ํ† ๋ฆฌ ๊ฒฝ๋กœ
instances: "1", // ํด๋Ÿฌ์Šคํ„ฐ ๋ชจ๋“œ์—์„œ ์‹คํ–‰ํ•  ์ธ์Šคํ„ด์Šค ์ˆ˜ (CPU ์ฝ”์–ด ์ˆ˜๋งŒํผ)
autorestart: true, // ํ”„๋กœ์„ธ์Šค ์ž๋™ ์žฌ์‹œ์ž‘ ํ™œ์„ฑํ™”
watch: false, // ํŒŒ์ผ ๋ณ€๊ฒฝ ๊ฐ์ง€ ํ™œ์„ฑํ™” (๊ฐœ๋ฐœ ์ค‘์—๋งŒ ํ™œ์šฉ)
Expand Down
2 changes: 1 addition & 1 deletion next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const nextConfig = {
},
],
},
//output: "standalone",
output: "standalone",
};

export default nextConfig;

0 comments on commit c9cb008

Please sign in to comment.