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.disttodocker-compose.override.yml - Edit
docker-compose.override.ymland changePOSTGRES_PASSWORD,PGADMIN_DEFAULT_EMAILandPGADMIN_DEFAULT_PASSWORDto something secure - Edit
docker-compose.override.ymland change 'changeme' substring inHASURA_GRAPHQL_DATABASE_URLwithPOSTGRES_PASSWORDvalue - Edit
docker-compose.override.ymland changeHASURA_GRAPHQL_ADMIN_SECRETto something secure docker-compose up -d --build- Go to the http://127.0.0.1:5050 and login to the pgAdmin via
PGADMIN_DEFAULT_EMAILandPGADMIN_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
publicusingpostgresowner - 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
exitto go out from the container docker-compose downdocker-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