Build your own GraphQL API with Docker, Node, and Postgres
This repository is organised into different branches that represent different evolutions of the codebase. You can view the documentation and code from the beginning by selecting the beginning by selecting the 01-beginning
branch.
Docker compose allows us to express a constellation of interconnected microservices. To stand up a local GraphQL API we employ three:
- db/ postgres container listens on port 5432. serves the
- server/ node server that runs postgraphile. listens on 8080 and connects to db container
The SQL file used to seed the database is from the postgraphile forum tutorial.
The container that runs postgraphile on node js. Start simple. Please inspect the code in server/Dockerfile
. More information is available in the Quick Start Guide.
See http://0.0.0.0:5000/graphiql
For more on how port mapping works in docker see this article