Hasura is a powerful open-source tool for building real-time GraphQL APIs quickly and securely. In this tutorial, we will show you how to install Hasura on OpenSUSE latest version.
The first step is to install Docker and Docker-compose, which are required to run Hasura.
sudo zypper refresh
sudo zypper install docker
sudo systemctl start docker
sudo systemctl enable docker
sudo zypper install docker-compose
mkdir hasura
cd hasura
sudo docker pull hasura/graphql-engine:latest
touch docker-compose.yml
version: '3.6'
services:
graphql-engine:
image: hasura/graphql-engine:v2.0.9
ports:
- "8080:8080"
environment:
HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:password@localhost:5432/dbname
HASURA_GRAPHQL_ENABLE_CONSOLE: "true"
depends_on:
- postgres
networks:
- hasura
postgres:
image: postgres:13-alpine
environment:
POSTGRES_PASSWORD: password
POSTGRES_DB: dbname
volumes:
- db-data:/var/lib/postgresql/data
networks:
- hasura
volumes:
db-data:
networks:
hasura:
Replace password
and dbname
with your own Postgres password and database name.
Start Hasura and Postgres containers:
sudo docker-compose up -d
http://<server-ip-address>:8080
in your web browser.In this tutorial, we have shown you how to install and configure Hasura on OpenSUSE Latest. You can now start building your own real-time GraphQL APIs using this powerful tool.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!