Hasura is an open source engine that connects to your databases & microservices and auto-generates a production-ready GraphQL backend.
This article is a quick walk through of how you can use Hasura locally with the aid of Docker and Docker Compose. So we are hoping that you've got these installed already ;-) See links below if not:
Step 1: Get the docker-compose file
You need to create a new folder first, so here is what I did:
cd proj mkdir hasura-docker-test && cd $_
proj is where I keep all of my code projects but it can of course be anything, however you choose to set out your folder structures.
Next you need to grab the remote file(s):
Just do a quick
ls and you should see the addition of a
docker-compose.yaml in your folder.
Step 2: Run Hasura GraphQL engine and Postgres
$ docker-compose up -d
Which runs the docker container in a detached state and the next step is to take a look at the containers' status:
$ docker ps
Step 3: Open up the Hasura Console
http://localhost:8080/console in your browser and you will see an instance of the Graphiql UI ready to go!