hasura 使用一個基於pg數據庫的graphql引擎,他的設計比postgrpahql 有好多方便的地方,同時使用也比較簡單html
docker && docker-composegit
curl -L https://cli.hasura.io/install.sh | bash hasura init --directory my-project cd my-project/install-scripts docker-compose up -d
├── config.yaml ├── install-scripts │ ├── docker-compose.yaml │ └── docker-run.sh └── migrations
主要是docker-compose.yamlgithub
version: '3.6' services: postgres: image: postgres ports: - "5432:5432" environment: - "POSTGRES_PASSWORD:dalong" volumes: - db_data:/var/lib/postgresql/data graphql-engine: image: hasura/graphql-engine:v1.0.0-alpha06 ports: - "8080:8080" depends_on: - "postgres" environment: - "POSTGRES_PASSWORD:dalong" command: > /bin/sh -c " graphql-engine --database-url postgres://postgres:dalong@postgres:5432/postgres serve --enable-console; " volumes: db_data:
https://github.com/hasura/graphql-engine
https://docs.hasura.io/1.0/graphql/manual/getting-started/docker-simple.htmlsql