Home / Companies / Nhost / Blog / Post Details
Content Deep Dive

How to Set Up Hasura with Docker Compose

Blog post from Nhost

Post Details
Company
Date Published
Author
Johan Eliasson
Word Count
561
Language
English
Hacker News Points
-
Summary

Setting up Hasura with Docker Compose enables developers to quickly deploy powerful GraphQL APIs by defining and running multi-container Docker applications. Hasura is an open-source tool that automatically generates a GraphQL schema based on your database's schema, while Docker Compose allows you to define and manage the services that constitute your application. To get started, developers need to ensure that Docker and Docker Compose are installed, then create a Docker Compose file named `docker-compose.yml`, defining services such as Postgres and Hasura. The configuration includes setting environment variables and exposing the Hasura service on port 8080 for browser access. Once the Docker Compose file is ready, executing the `docker-compose up` command will start the services, allowing access to the Hasura GraphQL Engine and its console at `http://localhost:8080`, where users can explore the GraphQL schema, run queries and mutations, and view database data.