-
Notifications
You must be signed in to change notification settings - Fork 0
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
fix(prisma): Correct volume permissions #997
Conversation
Define the order of deployments for correctness. Co-authored-by: Julia <[email protected]> Co-authored-by: Natasha <[email protected]>
To increase determinism, use full file paths. By not using relative paths, we remove the need for the working directory to be correct. Co-authored-by: Julia <[email protected]> Co-authored-by: Natasha <[email protected]>
Update AWS infrastructure, creating a volume at `/usr/src/app/prisma`, and download the S3 artifact to this directory. Co-authored-by: Julia <[email protected]> Co-authored-by: Natasha <[email protected]>
ea0e405
to
e3b7e59
Compare
|
||
COPY ./containers/prisma-migrate/run-prisma-migrate.sh ./run-prisma-migrate.sh | ||
RUN chmod +x ./run-prisma-migrate.sh | ||
COPY ./containers/prisma-migrate/run-prisma-migrate.sh /usr/src/app/run-prisma-migrate.sh |
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.
Using the full file path isn't strictly necessary as WORKDIR
is set above. However, it makes it easier to understand exactly what is being done.
const prismaVolume: Volume = { | ||
name: 'prisma-volume', | ||
const prismaArtifactVolume: Volume = { | ||
name: 'artifact-volume', |
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.
Renamed to "artifact" to distinguish this from the location the prisma binary is installed; "artifact" also matches the language used in other applications.
Since #986 the Prisma migration task has been failing with:
That is, we're unable to download a file from S3 to a read-only path.
What does this change, and why?
This change:
/usr/src/app/prisma
volume in the container, as a writable locationThis results in the above error being resolved, and the migrations completing. Indeed the logs show this:
An additional change was made to better orchestrate the deployment order. See the inline comment for more detail.
How has it been verified?
The updated container was deployed to, and ran on, CODE. See the above screenshot for the logs.
Co-authored-by: @JuliaBrigitte
Co-authored-by: @NovemberTang