Skip to content

Commit

Permalink
Merge pull request #12 from wbbly/dev
Browse files Browse the repository at this point in the history
UPDATE | Updated manual to be able to setup Wobbly from scratch
  • Loading branch information
athlonUA authored Feb 25, 2021
2 parents bbb9806 + 740c7b6 commit a1bc3a4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -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`.

Expand All @@ -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 <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
Expand All @@ -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`
4 changes: 1 addition & 3 deletions docker-compose.override.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,11 @@ 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:
- 8080:8080
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

0 comments on commit a1bc3a4

Please sign in to comment.