Skip to content

Commit

Permalink
Merge pull request #75 from hasura/djh/fix-local-engine
Browse files Browse the repository at this point in the history
Fix local engine
  • Loading branch information
danieljharvey authored Nov 15, 2023
2 parents 2fa38e0 + ada8e86 commit 26b01db
Show file tree
Hide file tree
Showing 4 changed files with 905 additions and 409 deletions.
6 changes: 6 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,11 @@ services:
source: ./metrics/grafana-data
target: /var/lib/grafana

auth-hook:
build: ../v3-engine/hasura-authn-webhook/dev-auth-webhook
init: true
ports:
- 3050:3050

volumes:
prom_data:
5 changes: 3 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,14 @@ start-metrics:
run-engine: start-dependencies
@echo "http://localhost:3000/ for graphiql console"
@echo "http://localhost:4002/ for jaeger console"
docker compose up --wait auth-hook
# Run graphql-engine using static Chinook metadata
# we expect the `v3-engine` repo to live next door to this one
RUST_LOG=DEBUG cargo run --release \
--manifest-path ../v3-engine/Cargo.toml \
--bin engine -- \
--metadata-path ./static/chinook-metadata.json

--metadata-path ./static/chinook-metadata.json \
--authn-config-path ./static/auth_config.json
# pasting multiline SQL into `sqlcmd` is a bad time, so here is a script to
# smash a file in for rapid fire application development business value
run-temp-sql:
Expand Down
12 changes: 12 additions & 0 deletions static/auth_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": "v1",
"definition": {
"allowRoleEmulationBy": "admin",
"mode": {
"webhook": {
"url": "http://localhost:3050/validate-request",
"method": "Post"
}
}
}
}
Loading

0 comments on commit 26b01db

Please sign in to comment.