Dev project hands-on GraphQL practise and showcasing the full pipeline, from develop to production.
- GraphQL Yoga
- Prisma Cloud as ORM
- Prisma Server on Heroku
- Jenkins CI/CD
- Docker for Web Node Server & DNS & SSL
- Alternative Approach: All services through docker
- Custom Docker Images
- Udemy - The Modern GraphQL Bootcamp
Copy .env.example to .env, and modify as per your needs.
The following script will run all the developer dependency commands. Creating web server, db server, and prisma server through docker containers.
When finished, you may interact with the web server for your dev needs, e.g. pressing rs
will restart the nodemod server.
$ ./docker/up-dev.sh
When you want to execute a command you may use the running container
graphql-blog-api_api_1
. E.g.:
$ docker exec -it graphql-blog-api_api_1 {npm install|prisma deploy|etc}
- $
prisma login|token|deploy
- $
npm run get-schema
Initially the infrastructure was setup on a custom Linux machine, with all dependency provided by docker services. However, because the prisma docker container is quite memory expensive even when idle, and with this project primary intent being hands on experience; both the prisma and the database docker services were moved to prisma cloud & heroku respectively. As for the node web server, that still lives on premises.
Reference to the initial setup; useful & good learning opportunity for future reference. https://github.com/rdok/graphql-blog.api/blob/v1.0.0/docker/docker-compose.yml