Skip to content

Schema.prisma is not reading the environment variables injected by elastic beanstalk #15561

Answered by jkomyno
NathanFrank285 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @NathanFrank285, thanks for opening this issue.

It appears that prisma searches the app for a .env file to draw the values from when this is run

Prisma resorts to the .env file only if it cannot find the variables it needs in the environment.
As a sanity check, can you please print your database url by running echo $DATABASE_URL before attempting to run npx prisma migrate deploy in your [ec2-user@ip-172-31-26-198 current] SSH session? I think the issue is that the environment variable set in Elastic Beanstalk is not available in your SSH session, as it is not persisted to your profile file.

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
5 replies
@NathanFrank285
Comment options

@NathanFrank285
Comment options

@nmn28
Comment options

@enosefelix
Comment options

@Sharifur
Comment options

Answer selected by jkomyno
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
bug/0-unknown Bug is new, does not have information for reproduction or reproduction could not be confirmed. kind/bug A reported bug.
6 participants
Converted from issue

This discussion was converted from issue #15552 on September 27, 2022 13:27.