Hello, I am really getting into Prisma now and how...
# prisma-whats-new
m
Hello, I am really getting into Prisma now and how it works. For the
application layer
, can that be hosted through the Prisma Cloud?
h
nope, you need to use exteral service
m
Hmm ok
r
As Huvik succinctly said, you will need to set up your own graphql server. However, it's not as bad as it sounds. You can use
prisma init
and select one of the boilerplate to work from. There are several largely painless deployment options as well, such as Zeit or Apex Up. Or you can use a Docker container on Digital Ocean or Amazon AWS.
Prisma Cloud takes care of the database layer, but the rest is up to you 😉
I'm using AWS ECS, which is docker service. if you need any docs for that, let me know
m
Thank you so much, I was thinking that Prisma Cloud might also take care of a
graphql-yoga
server but wasn't sure.
r
well, I had the exact same impression not too long ago so I kinda know what youre going through 😉
but as I said, its not that bad and it gives you a lot of control which is actually kind of nice
m
Well at least now I know 🙂 Thanks for the info
r
this is a maintained example of a server with prisma as its db layer
and this is a good article on graphql servers
just passing on what Ive been learning from the last couple of days 😉
if you have any questions, let me know!
good luck!
m
Oh my gosh, I think this just clicked. Prisma Cloud will host the Prisma api which will interact with the database. Then, I will have a
graphql-yoga
server which will interact with the Prisma API and all of the custom resolvers that I need. Does that make sense?
r
exactly
!
m
💥 < my brain after it finally makes sense
rein I would not have figured that out without you! 🙂 ty
r
my pleasure, glad I could be of service 🙂
l
@rein. I too am looking into AWS hosting everything. Do you deploy the ecs container with the DB also or are you connecting to a sql DB external to the container?
r
@lancej for now I am using Prisma Cloud to take care of the db layer, since I am still in the experimenting phase of my project the databrowser is a big help. That being said, you can also host your own prisma db on AWS if you want in a Docker container. Thats what I am doing right now with the application layer as well. I put my server in a docker container and deploy it to AWS ECS (elastic container service). The server is deployed in the same AWS region as where my Prisma cloud db is stored (since prisma cloud uses AWS RDS under the hood).
Im by no means an AWS expert, quite the opposite in fact, but I found some good guides and tutorials that got me started.
If you want to store Prisma on Docker (so not using Prisma cloud), you can use this template https://github.com/maxdarque/prisma-docker, it's made by @max so he can give you more info about it. When it comes to deploying the actual Docker containers on ECS, this is what got me setup: https://start.jcolemorrison.com/guide-to-fault-tolerant-and-load-balanced-aws-docker-deployment-on-ecs/ , he also has some more high level guides on AWS (hitchhikers guide to AWS) that are nice to get a higher level overview of the infrastructure.
If something is not quite clear, let me know!
l
Thanks. Will be going this route in a couple of weeks but looking at external sql
n
Thanks for the great discussion everyone. You can also find more resources here: https://www.graph.cool/forum/t/sparkles-awesome-prisma/2878?u=nilan 🙂