-
Notifications
You must be signed in to change notification settings - Fork 6
chore: 本番環境向けにCIを書き換え #67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
sora81dev
wants to merge
15
commits into
sf-kosen:main
Choose a base branch
from
sora81dev:chore/update-ci-for-production
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 8 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
48da81f
chore: ready for new CI system
sora81dev c88d4a4
fix: typo in docker-compose.yml
sora81dev 3efc843
fix: use pnpm even in build section
sora81dev 7473876
fix: remove tsconfig-paths for ci
sora81dev 107df08
Update .dockerignore
Akikukeo1 47a7bd9
chore: update .dockerignore
sora81dev 4dbb19a
chore: remove package-lock.json for conflicts
sora81dev afb629d
Merge branch 'main' into chore/update-ci-for-production
sora81dev e2c5fc1
Update Dockerfile
sora81dev 0bcd26a
Update Dockerfile
sora81dev b4eedfb
fix: add packageManager info
sora81dev a46ac48
Update check.yml to remove pnpm version
Akikukeo1 b7698ac
Merge pull request #3 from Akikukeo1/patch-1
sora81dev 957e6db
Refactor Dockerfile stages for clarity and efficiency
Akikukeo1 e822157
refactor: Dockerfile stages for clarity and efficiency (#4)
sora81dev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| .git | ||
| .github | ||
|
|
||
| Dockerfile | ||
| .dockerignore | ||
|
|
||
| node_modules/ | ||
| .pnpm-store/ | ||
|
|
||
| build/ | ||
| dist/ | ||
| .next/ | ||
| out/ | ||
|
|
||
| *.log | ||
|
|
||
| .env | ||
| .env.* | ||
|
|
||
| .DS_Store |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,34 @@ | ||
| FROM node:24 | ||
| FROM node:24 AS base | ||
|
|
||
| COPY package*.json ./ | ||
| RUN npm install | ||
| ENV PNPM_HOME="/pnpm" | ||
| ENV PATH="$PNPM_HOME:$PATH" | ||
| RUN corepack enable | ||
|
Comment on lines
+3
to
+5
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. この指摘は妥当そう。 修正はこのレビューをコミットするか、 を追加しておくのがよさそうです。
|
||
|
|
||
| WORKDIR /app | ||
| COPY package*.json pnpm-lock.yaml ./ | ||
|
sora81dev marked this conversation as resolved.
Outdated
|
||
|
|
||
| FROM base AS development | ||
| RUN pnpm install --frozen-lockfile | ||
| COPY . . | ||
|
|
||
| CMD ["pnpm", "run", "dev"] | ||
|
|
||
| FROM base AS builder | ||
| RUN pnpm install --frozen-lockfile | ||
| COPY . . | ||
| CMD ["npm", "run", "dev"] | ||
|
|
||
| RUN pnpm run build | ||
|
|
||
| FROM base AS production | ||
| ENV NODE_ENV=production | ||
|
|
||
| COPY tsconfig.json ./ | ||
|
|
||
| RUN pnpm install --frozen-lockfile --prod | ||
|
sora81dev marked this conversation as resolved.
|
||
|
|
||
| COPY --from=builder /app/build ./build | ||
|
|
||
| USER node | ||
| EXPOSE 3000 | ||
|
|
||
| CMD ["node", "./build/index.js"] | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
書くなら
package.jsonかな。