How can I setup prisma to use an external database...
# prisma-whats-new
How can I setup prisma to use an external database, like aurora?
👍 1
I started looking in the src code for production ymls, but found only a dev setup, that references the internal database setup in a docker container. I also hope to use it with RDS/Aurora - i mean running the DB dockerized in production is not a serious option. @nilan wrote me, that i would be actually be supposed to host the DB on my own while i can leverage Prisma Cloud, so i assume it is possible to point it to the external DB!
@Nick Luger " i mean running the DB dockerized in production is not a serious option" why is it not a serious option?
Also we are talking about DB and Prisma being bundled into one multi-container docker application. How does this work if i would run multiple instances of Prisma?
For example i run 6 instances of Prisma and want 4 read replicas of my MySQL DB.
What's your opinion on that @max? Do you need to run a dedicated Prisma instance or Prisma cloud with your own DB?
I've been posting on the forum as meep. So you've seen my post here:'ve never used docker or setup a db before. 6 years ago I used to be a java dev working on proprietary encryption management systems (military grade). And I only got back into programming (React, JS, Typescript, GraphQL
and now Prisma within the last year. I was hoping graphcool would mean I wouldn't need to host my own db. So at the moment waiting for prisma cloud t come out and I can pair that with apex/up + AWS lambda to host my graphql-yoga server
@Nick Luger
I was going to use the prisma cloud for everything (prisma + db). I'm realizing now (a little too late) that relying on a start-up is tricky
should have used a batteries-included framework like django
else I if I really needed to I guess I could migrate my graphql-yoga server and use a different db. It'll just be a lot of learning. Maybe use Aurora
@Nick Luger did you see rohanray's post regarding memory usage of his prisma docker container on digital ocean. Keeps maxing out memory
I'm writing a longer answer, one moment 😂
just a quick comment before I have a closer look, it's really difficult to keep track of all the different discussions 🙂 I would prefer to keep one discussion in one place, and I suggest to use the forum thread @max linked above. I think this is a super interesting topic and appreciate all your input!
Ok, as @nilan suggested, i will write a response to this in the post, @max!
Thank you @max 😁max for porting the thread was just doing the same !
@nilan @Nick Luger I've updated the thread with our comments 🙂
thanks, will chime in later today 🙌
Dear @max, posted you a response in the forum
@Nick Luger good post. Just replied
@Nick Luger and @max great posts and discussion. I have the same 4 options, though I've already done 3 -- hand-wrung a GraphQL server on Elixir with Absinthe. That experience brought me here. Please keep the dialog going
@lawjolla how did you find creating a GraphQL server on Elixir with Absinthe?
the other idea I'm thinking through is putting a
server in front of a
A mixed bag. Ben and Bruce (Absinthe creators) are about as smart, hands on, and helpful as anyone in OSS. I think Elixir is mostly brilliant (lack of explicit imports and overuse of metaprogramming / macros drove me nuts). The pain came through the tie in to Ecto, Elixir's blessed ORM (though they don't call it that for snotty functional programming reasons 🙂). As ORMs go, it's good -- even great -- I just don't like ORMs. My other issues were the extreme amount of boilerplate, endless db migrations, and slow GraphQL development (it's just two guys, can't expect much). That said, most of those last three reasons are present in every GraphQL landscape
Since Absinthe is not fully featured yet, I realized that my entire business would depend on two guys developing in their free time. Not a great spot. So for all of those reasons, I went hunting
@max you could do that, though it would be painful to go through that effort, essentially duplicating Graphcool's work, only to see Prisma (likely) smooth the bugs out
thanks for the detailed answer. Yeah I hear that the amount of boilerplate in graphql is often quite significant. This is where prisma is fantastic so fingers crossed they can stablise it and get prisma cloud released