Confused here... I'm making my first attempt to de...
# orm-help
z
Confused here... I'm making my first attempt to deploy Prisma server to AWS via serverless.com - this surely involves Docker?
n
You can't deploy Docker via serverless afaik.
z
ok, the docs link to AWS Lambda within serverless docs - but there are no hints there how to setup a Prismas server? https://docs-beta.prisma.io/1.13/maintain/graphcool-to-prisma/server-hosting-gcf6/#deployment-with-the-serverless-framework
n
This part of the docs talk about your GraphQL server (most of those are written in Node;
graphql-yoga
or
apollo-server
). Not about the Prisma server, which runs in Docker.
z
I was hoping to deploy them both on AWS (as sepearate services) - so serverless wont help me with that?
n
You can use serverless to deploy a JavaScript function that runs within AWS Lambda, if that's what you want to do.
Here's an example for running
graphql-yoga
on Lambda: https://github.com/prisma/graphql-yoga/tree/master/examples/lambda
d
BTW - Zeit just announced this yesterday: https://zeit.co/blog/serverless-docker I haven’t tried it yet though.
😍 1
n
credits to @develomark πŸ™‚
z
ok, sorry for my confusion - so the Node server will run Prisma & GraphQL server within AWS Lambda - what about the database then?
n
so the Node server will run Prisma & GraphQL server within AWS Lambda
This sentence doesn't make any sense, whatsover πŸ™‚
z
πŸ˜• sorry I'm trying! there are 3 servers; Prisma, GraphQL and database
n
The Node server has nothing to do with the Prisma server from an infrastructure point of view. Prisma cannot run in AWS Lambda as of today.
The database server runs whereever you want, Prisma will connect to it via HTTP. You'd want to minimize the latency between Prisma and DB server.
Keep in mind that you don't have to run anything on AWS Lambda either, you can also run a long running process instead, with a real server, if you prefer. You don't have to use AWS Lambda to run a GraphQL server.
z
so maybe it's easiest to set up a Docker which runs all three servers?
you mean Prisma isn't a nodejs based service?
n
You probably want to split the three servers up. Especially the database server would run on its own.
Prisma is not a Node service, correct.
We actually to have a couple of deployment tutorials, have you seen them? They're here: https://www.prisma.io/docs/tutorials/
z
this is awkard πŸ˜• but what kind of service is Prisma then?
n
The landscape of different deployment options is quite vast, so I recommend to you do some research (and you can use those tutorials as a start).
Why is it awkward? Prisma is an infrastructure component running in Docker.
z
--yes I have indeed but my experience of cloud computing is minimal so it's all now for me
well just asking these silly questions here on this forum!
n
well, we should definitely make a better job at making the answers to these questions easily available!
We've actually reworked our documentation, have you seen them already? https://docs-beta.prisma.io/
z
yes I have, they helped me a lot learning Prisma itself - it's just the deployment that confuses me as my experience is mostly frontend
I was planning to deploy to Heroku for the first time to make it easy but then I found out I can't do version upgrade so I backed out
n
I see! This is indeed something we want to tackle - https://github.com/prisma/prisma-cloud-feedback/issues/202. Furthermore, we're looking into adding even more cloud integrations similar to the Heroku integration. Maybe in your situation deploying Prisma to Digital Ocean would be the most suitable situation. I've talked to lots of developers who did so successfully, even if they didn't have a lot of experience with Digital Ocean before.
πŸ‘ 1
z
I see lots of updates in the beta docs - it's definitely time to read through it page by page
πŸ‘Œ 1
n
absolutely! let us know how you feel about them, or if you're missing anything πŸ™‚ cc @nikolasburk
z
if I deploy to Digital Ocean and use for production - isn't it 100% I can migrate to another host later (eg AWS) using Prisma's import/export ?
n
Sure, you can move to another host.
z
I think this is the last one... AWS provides Docker hosting - is there any reason Prisma+database in Docker wouldn't work in AWS? https://aws.amazon.com/getting-started/tutorials/deploy-docker-containers/
and if I'd go for Digital Ocean, would I host GraphQL server also in same Docker or seperately?
n
however you decide
z
re GraphQL on DigitalOcean - is that somehow antipattern?