Skip to content

Commit

Permalink
pin prisma version in dockerfiles, allow tofu apply workflow dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
zeeket committed May 26, 2024
1 parent 8c93d45 commit aef8129
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/push-apply.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: push-apply

on:
on:
push:
branches:
- main
workflow_dispatch:

jobs:
fmt:
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.dbsync
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ COPY prisma ./prisma
RUN \
if [ -f pnpm-lock.yaml ]; \
then \
pnpm add prisma && pnpm i; \
pnpm add prisma@4.16.2 && pnpm i; \
else \
echo "Lockfile not found." && exit 1; \
fi
Expand Down
6 changes: 3 additions & 3 deletions docker/Dockerfile.prod
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ WORKDIR /app

COPY ./prisma ./

# Install dependencies based on the preferred package manager
# Install dependencies if lockfile exists

COPY package.json pnpm-lock.yaml ./

RUN \
if [ -f pnpm-lock.yaml ]; \
then \
yarn global add pnpm && pnpm add prisma && pnpm i; \
yarn global add pnpm && pnpm add prisma@4.16.2 && pnpm i; \
else \
echo "Lockfile not found." && exit 1; \
fi
Expand All @@ -30,7 +30,7 @@ WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .

RUN pnpx prisma generate
RUN pnpm dlx prisma@4.16.2 generate
ENV NEXT_TELEMETRY_DISABLED 1

# Pass the name of the Telegram bot from GitHub variables to the build process if it exists.
Expand Down

0 comments on commit aef8129

Please sign in to comment.