-
-
Notifications
You must be signed in to change notification settings - Fork 1
Fix deployment issues #129
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
Merged
Merged
Changes from all commits
Commits
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
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 |
|---|---|---|
|
|
@@ -5,21 +5,36 @@ FROM node:20-alpine AS builder | |
| RUN apk add --no-cache libc6-compat | ||
|
|
||
| WORKDIR /app | ||
| COPY package.json ./ | ||
|
|
||
| # Copy root configuration | ||
| COPY package.json package-lock.json* turbo.json tsconfig.json ./ | ||
|
|
||
| # Copy workspace package.json files | ||
| COPY apps/web/package.json ./apps/web/ | ||
| COPY apps/api/packages/crypto/package.json ./apps/api/packages/crypto/ | ||
| COPY apps/api/packages/shared/package.json ./apps/api/packages/shared/ | ||
|
|
||
| # Install dependencies | ||
| RUN npm install | ||
| COPY . . | ||
|
|
||
| # Copy source code | ||
| COPY apps/web ./apps/web | ||
| COPY apps/api/packages/crypto ./apps/api/packages/crypto | ||
| COPY apps/api/packages/shared ./apps/api/packages/shared | ||
|
|
||
| ARG VITE_API_URL | ||
| ENV VITE_API_URL=$VITE_API_URL | ||
| ENV CI=true | ||
|
|
||
| # Build the web application | ||
| WORKDIR /app/apps/web | ||
| RUN npm run build | ||
|
|
||
| # STAGE 2: Run the application | ||
| FROM node:20-alpine AS runner | ||
|
||
| WORKDIR /app | ||
| RUN npm install -g serve | ||
| COPY --from=builder /app/dist ./dist | ||
| COPY --from=builder /app/apps/web/dist ./dist | ||
| ENV PORT=3000 | ||
| EXPOSE 3000 | ||
| CMD ["serve", "-s", "dist", "-l", "3000"] | ||
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
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
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.
The build process will fail because the dependent packages (@handoverkey/crypto and @handoverkey/shared) are not built before building the web application. These packages need to be compiled from TypeScript to their dist directories before the web app can import them. Consider building the dependencies first by either: 1) Using turbo to build from the root with "turbo run build --filter=@handoverkey/web", or 2) Explicitly building crypto and shared packages before changing to the web directory.