https://github.com/twyla-ai/hasura-world-db
A graphql interface using hasura and postgres for the MySQL world sample dataset
https://github.com/twyla-ai/hasura-world-db
docker graphql graphql-interface hasura postgresql sample-dataset testing world-database
Last synced: 3 months ago
JSON representation
A graphql interface using hasura and postgres for the MySQL world sample dataset
- Host: GitHub
- URL: https://github.com/twyla-ai/hasura-world-db
- Owner: twyla-ai
- License: mit
- Created: 2019-07-22T17:02:53.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-10T04:58:52.000Z (about 2 years ago)
- Last Synced: 2025-01-01T16:42:05.446Z (5 months ago)
- Topics: docker, graphql, graphql-interface, hasura, postgresql, sample-dataset, testing, world-database
- Language: PLpgSQL
- Size: 107 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hasura World Database Demo
[](https://quay.io/repository/twyla-ai/hasura-world-db)
[](https://github.com/twyla-ai/hasura-world-db/actions?query=workflow%3A%22Main%22)A graphql interface using [hasura](https://hasura.io/) and postgres for the [MySQL world sample dataset](http://pgfoundry.org/frs/?group_id=1000150&release_id=366#world-world-1.0-title-content).
### Usage Examples
For hasura configuration options and usage, please refer to their wonderful documentation [here](https://docs.hasura.io/1.0/graphql/manual/index.html).
In the following scenarios, the api and console will be available at `http://127.0.0.1:8080/`- [Kubernetes Deployment](examples/kube-deployment.yaml)
- [Docker Compose](examples/docker-compose.yaml)
- [GitHub Action Workflow](examples/github-actions.yaml)
- [Circle CI](examples/circleci.yaml)#### Podman
You can use the Kubernetes Deployment examples to start a pod with a postgres database and hasura.
```bash
podman play kube examples/kube-deployment.yaml
```#### Docker
In this scenario, we assume that you already have a database running that can be reached from within the container.
```bash
# obviously secret is secret here and is not intended to be "secure" as this is a demo app
docker run --rm -it -p 8080:8080 \
-e HASURA_GRAPHQL_DATABASE_URL="postgres://hasura:hasura@postgres-host-addr:5432/hasura" \
-e HASURA_GRAPHQL_ENABLE_CONSOLE="true" \
-e HASURA_GRAPHQL_ADMIN_SECRET="secret" \
quay.io/twyla-ai/hasura-world-db:latest
```