Skip to content
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

Explicitly version node and prisma in the migrate image #879

Merged
merged 2 commits into from
Mar 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions containers/prisma-migrate/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18-alpine
FROM node:20.11.1-alpine

WORKDIR /usr/src/app

Expand All @@ -9,7 +9,8 @@ RUN apk --no-cache add aws-cli
# Install the Prisma NPM package
# This will allow us to use the prisma migrate deploy command
RUN npm init -y
RUN npm install prisma
# TODO: Keep the version automatically in sync with common/package.json
RUN npm install [email protected]

Comment on lines +12 to +13
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suspect this'll get annoying very quickly as Dependabot updates Prisma every week...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point 👍

Simplest route might be to just COPY ./packages/common/package.json ... and RUN npm install. A multi-stage build could be used to drop all of the dependencies we don't care about.

COPY ./containers/prisma-migrate/run-prisma-migrate.sh ./run-prisma-migrate.sh
RUN chmod +x ./run-prisma-migrate.sh
Expand Down
Loading