From 740c7b628dc065326d15339d1c2f47c1ad09da2e Mon Sep 17 00:00:00 2001 From: Alexander G Date: Fri, 12 Feb 2021 17:44:37 +0200 Subject: [PATCH] UPDATE | Updated manual to be able to setup Wobbly from scratch --- README.md | 17 ++++++++++------- docker-compose.override.yml.dist | 4 +--- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index a0c8089..dc4a015 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Wobbly.me GraphQL Engine on Docker with pgAdmin +# Wobbly GraphQL Engine on Docker with pgAdmin This Docker Compose setup runs [Hasura GraphQL Engine](https://github.com/hasura/graphql-engine) along with Postgres and [pgAdmin4](https://www.pgadmin.org/) using `docker-compose`. @@ -12,11 +12,14 @@ This Docker Compose setup runs [Hasura GraphQL Engine](https://github.com/hasura - Clone this repo on a machine where you'd like to deploy graphql engine - Copy `docker-compose.override.yml.dist` to `docker-compose.override.yml` - Edit `docker-compose.override.yml` and change `POSTGRES_PASSWORD`, `PGADMIN_DEFAULT_EMAIL` and `PGADMIN_DEFAULT_PASSWORD` to something secure +- Edit `docker-compose.override.yml` and change 'changeme' substring in `HASURA_GRAPHQL_DATABASE_URL` with `POSTGRES_PASSWORD` value - Edit `docker-compose.override.yml` and change `HASURA_GRAPHQL_ADMIN_SECRET` to something secure - `docker-compose up -d --build` -- Go to the http://localhost:5050 and login to the pgAdmin via `PGADMIN_DEFAULT_EMAIL` and `PGADMIN_DEFAULT_PASSWORD` -- Add new connection to the postgres sever -- Drop Cascade all the Schemas and create schema with name `public` using `postgres` owner +- Go to the http://127.0.0.1:5050 and login to the pgAdmin via `PGADMIN_DEFAULT_EMAIL` and `PGADMIN_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` using `postgres` owner - Enter to the postgres docker container `docker exec -ti bash` - Restore database using `pg_restore -U -d postgres -1 /data/fixtures/fixtures.dump` - Type `exit` to go out from the container @@ -25,6 +28,6 @@ This Docker Compose setup runs [Hasura GraphQL Engine](https://github.com/hasura ## Important endpoints -- GraphQL endpoint will be `http://localhost:8080/v1alpha1/graphql` -- Hasura Console will be available on `http://localhost:8080/console` -- pgAdmin will be available on `http://localhost:5050` +- 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` diff --git a/docker-compose.override.yml.dist b/docker-compose.override.yml.dist index de05750..cbf9e55 100644 --- a/docker-compose.override.yml.dist +++ b/docker-compose.override.yml.dist @@ -13,8 +13,6 @@ services: environment: PGADMIN_DEFAULT_EMAIL: pgadmin@example.com PGADMIN_DEFAULT_PASSWORD: admin - volumes: - - ./pgadmin_storage:/var/lib/pgadmin/storage graphql-engine: image: hasura/graphql-engine:v1.3.0 ports: @@ -22,4 +20,4 @@ services: environment: HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:changeme@postgres:5432/postgres HASURA_GRAPHQL_ENABLE_CONSOLE: "true" - # HASURA_GRAPHQL_ADMIN_SECRET: myadminsecretkey + HASURA_GRAPHQL_ADMIN_SECRET: myadminsecretkey