-
Notifications
You must be signed in to change notification settings - Fork 27
Deployment update #222
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
Deployment update #222
Changes from 3 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
d8b4c67
In preparation of deployment and config update, and some optimisation
Rufat00 073e21c
Fixing past mistakes
Rufat00 a782787
deleted backups app
Rufat00 63fdf70
Delete Dockerfile
Rufat00 82d08ca
Fix comparison logic for user position in Restricted component
Rufat00 0844411
Merge branch 'dev' into deployment_update
joshuasilva414 2f44af4
Major bug fix
Rufat00 b00c111
Minor bug fix
Rufat00 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
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,52 @@ | ||
| # syntax=docker.io/docker/dockerfile:1 | ||
|
|
||
| FROM node:20-alpine AS base | ||
| RUN corepack enable | ||
|
|
||
| # Install dependencies only when needed | ||
| FROM base AS deps | ||
| # Alpine sometimes needs libc6-compat for some npm packages. | ||
| RUN apk add --no-cache libc6-compat | ||
| WORKDIR /app | ||
|
|
||
| # Copy workspace manifests so pnpm can install only necessary packages | ||
| COPY package.json pnpm-lock.yaml pnpm-workspace.yaml* .npmrc* ./ | ||
| RUN pnpm install --frozen-lockfile | ||
|
|
||
| # Rebuild the source code only when needed | ||
| FROM base AS builder | ||
| WORKDIR /app | ||
| COPY --from=deps /app/node_modules ./node_modules | ||
| COPY . . | ||
|
|
||
| # Disable Next.js telemetry during build | ||
| ENV NEXT_TELEMETRY_DISABLED=1 | ||
|
|
||
| # Build only the web app from the pnpm workspace | ||
| RUN pnpm --filter web build | ||
|
|
||
| # Production image, copy only the standalone output for `apps/web` | ||
| FROM base AS runner | ||
| WORKDIR /app | ||
|
|
||
| ENV NODE_ENV=production | ||
|
|
||
| # Disable Next.js telemetry at runtime | ||
| ENV NEXT_TELEMETRY_DISABLED=1 | ||
|
|
||
| RUN addgroup --system --gid 1001 nodejs | ||
| RUN adduser --system --uid 1001 nextjs | ||
|
|
||
| # Copy public and standalone output from the workspace app | ||
| COPY --from=builder /app/apps/web/public ./public | ||
| COPY --from=builder --chown=nextjs:nodejs /app/apps/web/.next/standalone ./ | ||
| COPY --from=builder --chown=nextjs:nodejs /app/apps/web/.next/static ./.next/static | ||
|
Rufat00 marked this conversation as resolved.
Outdated
|
||
|
|
||
| USER nextjs | ||
|
|
||
| EXPOSE 3000 | ||
|
|
||
| ENV PORT=3000 | ||
| ENV HOSTNAME="0.0.0.0" | ||
|
|
||
| CMD ["node", "server.js"] | ||
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.