This Docker Compose setup runs Hasura GraphQL Engine along with Postgres and pgAdmin4 using docker-compose
.
- Clone this repo on a machine where you'd like to deploy graphql engine
- Copy
docker-compose.override.yml.dist
todocker-compose.override.yml
- Edit
docker-compose.override.yml
and changePOSTGRES_PASSWORD
,PGADMIN_DEFAULT_EMAIL
andPGADMIN_DEFAULT_PASSWORD
to something secure - Edit
docker-compose.override.yml
and change 'changeme' substring inHASURA_GRAPHQL_DATABASE_URL
withPOSTGRES_PASSWORD
value - Edit
docker-compose.override.yml
and changeHASURA_GRAPHQL_ADMIN_SECRET
to something secure docker-compose up -d --build
- Go to the http://127.0.0.1:5050 and login to the pgAdmin via
PGADMIN_DEFAULT_EMAIL
andPGADMIN_DEFAULT_PASSWORD
- Use pgAdmin UI to add new connection to the postgres server
- Connect to the postgres server
- Drop Cascade all the Schemas
- Create new schema with name
public
usingpostgres
owner - Enter to the postgres docker container
docker exec -ti <postgres-container> bash
- Restore database using
pg_restore -U <POSTGRES_USER> -d postgres -1 /data/fixtures/fixtures.dump
- Type
exit
to go out from the container docker-compose down
docker-compose up -d --build
- GraphQL endpoint will be
http://127.0.0.1:8080/v1/graphql
- Hasura Console will be available on
http://127.0.0.1:8080/console
- pgAdmin will be available on
http://127.0.0.1:5050