Skip to content

Commit

Permalink
🔧 Fix Dockerfile commands for package management and build process. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
gregkonush authored Aug 25, 2024
1 parent a2a10e2 commit 0ecef86
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions apps/ecran/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ FROM node:20-alpine AS base
FROM base AS deps
WORKDIR /app
COPY package.json ./
RUN corepack enable pnpm && corepack pnpm install
RUN corepack enable && corepack enable pnpm && pnpm install

# Rebuild the source code only when needed
FROM base AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
ENV NEXT_TELEMETRY_DISABLED 1
RUN corepack enable pnpm && corepack pnpm run build
RUN corepack enable && corepack enable pnpm && pnpm run build

# Production image, copy all the files and run next
FROM base AS runner
Expand All @@ -23,7 +23,7 @@ RUN adduser --system --uid 1001 nextjs
COPY --from=builder /app/public ./public
COPY --from=builder /app/drizzle ./drizzle
COPY --from=builder /app/src/db ./src/db
RUN pnpm add drizzle-orm postgres
RUN corepack enable && corepack enable pnpm && pnpm install drizzle-orm postgres

# Set the correct permission for prerender cache
RUN mkdir .next
Expand Down
2 changes: 1 addition & 1 deletion apps/ecran/kustomize/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:
- name: run-migrations
image: gitea.proompteng.ai/d/lab/ecran:main
imagePullPolicy: Always
command: ['npx', 'tsx', './src/db/migrate.ts']
command: ['pnpm', 'run', 'migrations']
env:
- name: DB_URI
valueFrom:
Expand Down

0 comments on commit 0ecef86

Please sign in to comment.