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
How to deploy KeystoneJS if we're not a DevOps master? #2488
Comments
Hi Maxime! |
Hey @maximelebreton Thank you so much for taking the time to write this up! One of out biggest challenges is that because Keystone is such an unopinionated framework it's really hard to define a 'standard' deployment path. (although we should try) The GraphQL API and Keystone Admin should (probably) be deployed to a service like Heroku as it is an express App. This is not going to work on Netlify, although although it can on Now.sh as they can run an express app as a serverless function. Here is an example: https://github.com/mitchellhamilton/keystonejs-now-example For front-end apps you have the option of deploying a "Keystone App" which is an express middleware. In this situation your front-end and backend live together in one big App. Alternatively you can create a standalone front-end app that consumes the API and you can build and deploy this however you like including in a different repository. |
We are going to do more to try and improve the docs and take your experience into account. If you have time how would you feel about contributing to a tutorial from a front-end developers perspective? |
To actually answer your issue... Looking at your error messages, it appears that something is hanging during the What is the contents of your Can you provide a minimum reproduction? Is there a basic setup which you can share publicly which exhibits the same behaviour? That way we can investigate for you. We also have a master issue with links out to various deployment approaches: The most applicable to you might be the Heroku ticket which has a rough outline of what to do: |
I'm also having a really difficult time deploying. I'm trying to do it on Heroku. I want to learn how to do it and I'm happy to contribute to the documentation. How shall we go about it? I can think of several approaches:
What do you think? |
We've added a guide on deploying to Heroku: #2598, over time I hope we can add additional guides and tutorials. |
Hello,
I'm a front-end developer, and I'm very dumped about
KeystoneJS
for deployment in production.I install and run
KeystoneJS
locally with the starter and everything works as excepted, easy and without issue.But now I want to deploy it online, on Netlify or Now.sh, and I just don't understand why it's so complicated, and the documentation is really not helpful for guys who're not DevOps! (and I hope you want Keystone to be more accessible?)
So here are my steps, as a front-end developer (with no background with back-end stuff):
I tried the
build
andstart
on netlify, it doesn't works:Build exceeded maximum allowed runtime
Netlify error
I tried
build
andstart
on now.sh, and it doesn't works:Task XXX is stuck in BUILDING for 2700000ms
Now.sh error
So I tried the Docker way as in the documentation:
Dockerfile
And then:
docker build -t my-image .
And first, the Docker image was built with success, but I had this warning about peer dependencies:
Peer dependencies warning
But when I tried to run it:
docker run --rm -p 127.0.0.1:3000:3000 my-image:latest
I have this error:
There are no Admin UI build artifacts. Please run keystone build before running keystone start
Keystone Error
And Voilà.
I'm here with my "Keystone fatigue", and I hope there is someone to help me, and improve the Keystone documentation about the deployment phase, because it should be easy / accessible.
Thanks!
The text was updated successfully, but these errors were encountered: