Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add avatarUrl and login to custom claims #24

Merged
merged 1 commit into from
Oct 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 35 additions & 36 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,43 +36,42 @@ services:
start_period: 5s

hasura:
container_name: hasura
image: hasura/graphql-engine:v2.15.2
depends_on:
db:
condition: service_healthy
ports:
- "8080:8080"
restart: unless-stopped
environment:
DATABASE_URL: postgres://postgres:postgres@db/marketplace_db
BACKEND_GRAPHQL_URL: ${BACKEND_GRAPHQL_URL:-http://host.docker.internal:8000/graphql}
BACKEND_REST_API_URL: ${BACKEND_REST_API_URL:-http://host.docker.internal:8000/api}
BACKEND_GRAPHQL_API_KEY: ${BACKEND_GRAPHQL_API_KEY:-myapikey}
HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:postgres@db/marketplace_db
HASURA_GRAPHQL_ENABLE_CONSOLE: "false" # use Hasura CLI to access the console, see projet README
HASURA_GRAPHQL_DEV_MODE: "true"
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
HASURA_GRAPHQL_ADMIN_SECRET: ${HASURA_GRAPHQL_ADMIN_SECRET:-myadminsecretkey}
HASURA_GRAPHQL_UNAUTHORIZED_ROLE: public
HASURA_GRAPHQL_ENABLE_REMOTE_SCHEMA_PERMISSIONS: "true"
HASURA_GRAPHQL_JWT_SECRET: ${HASURA_GRAPHQL_JWT_SECRET}
HASURA_GRAPHQL_EXPERIMENTAL_FEATURES: naming_convention
HASURA_GRAPHQL_DEFAULT_NAMING_CONVENTION: graphql-default
HASURA_EVENT_WEBHOOK: https://enqxb9z71g92.x.pipedream.net/
HASURA_SUGGESTION_WEBHOOK: ${HASURA_SUGGESTION_WEBHOOK:-https://en2avf74ldu54.x.pipedream.net}
ENV: local
extra_hosts:
- "host.docker.internal:host-gateway"
healthcheck:
test: bash -c ':> /dev/tcp/127.0.0.1/8080' || exit 1
interval: 2s
timeout: 1s
retries: 10
start_period: 5s
container_name: hasura
image: hasura/graphql-engine:v2.15.2
depends_on:
db:
condition: service_healthy
ports:
- "8080:8080"
restart: unless-stopped
environment:
DATABASE_URL: postgres://postgres:postgres@db/marketplace_db
BACKEND_GRAPHQL_URL: ${BACKEND_GRAPHQL_URL:-http://host.docker.internal:8000/graphql}
BACKEND_REST_API_URL: ${BACKEND_REST_API_URL:-http://host.docker.internal:8000/api}
BACKEND_GRAPHQL_API_KEY: ${BACKEND_GRAPHQL_API_KEY:-myapikey}
HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:postgres@db/marketplace_db
HASURA_GRAPHQL_ENABLE_CONSOLE: "false" # use Hasura CLI to access the console, see projet README
HASURA_GRAPHQL_DEV_MODE: "true"
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
HASURA_GRAPHQL_ADMIN_SECRET: ${HASURA_GRAPHQL_ADMIN_SECRET:-myadminsecretkey}
HASURA_GRAPHQL_UNAUTHORIZED_ROLE: public
HASURA_GRAPHQL_ENABLE_REMOTE_SCHEMA_PERMISSIONS: "true"
HASURA_GRAPHQL_JWT_SECRET: ${HASURA_GRAPHQL_JWT_SECRET}
HASURA_GRAPHQL_EXPERIMENTAL_FEATURES: naming_convention
HASURA_GRAPHQL_DEFAULT_NAMING_CONVENTION: graphql-default
HASURA_EVENT_WEBHOOK: https://enqxb9z71g92.x.pipedream.net/
HASURA_SUGGESTION_WEBHOOK: ${HASURA_SUGGESTION_WEBHOOK:-https://en2avf74ldu54.x.pipedream.net}
ENV: local
extra_hosts:
- "host.docker.internal:host-gateway"
healthcheck:
test: bash -c ':> /dev/tcp/127.0.0.1/8080' || exit 1
interval: 2s
timeout: 1s
retries: 10
start_period: 5s

hasura-auth:

container_name: hasura-auth
image: onlydustxyz/hasura-auth:latest
depends_on:
Expand All @@ -86,7 +85,7 @@ services:
HASURA_GRAPHQL_GRAPHQL_URL: http://hasura:8080/v1/graphql
HASURA_GRAPHQL_ADMIN_SECRET: ${HASURA_GRAPHQL_ADMIN_SECRET:-myadminsecretkey}
AUTH_ACCESS_TOKEN_EXPIRES_IN: 604800 # 1 week
AUTH_JWT_CUSTOM_CLAIMS: '{"projectsLeaded":"registeredUser.projectsLeaded[].projectId","githubUserId":"registeredUser.githubUserId","odAdmin":"registeredUser.admin","githubAccessToken":"userGithubProvider.accessToken"}'
AUTH_JWT_CUSTOM_CLAIMS: '{"projectsLeaded":"registeredUser.projectsLeaded[].projectId","githubUserId":"registeredUser.githubUserId","odAdmin":"registeredUser.admin","githubAccessToken":"userGithubProvider.accessToken","avatarUrl":"registeredUser.avatarUrl","login":"registeredUser.login"}'
AUTH_USER_DEFAULT_ALLOWED_ROLES: public,me,registered_user
AUTH_USER_DEFAULT_ROLE: registered_user
AUTH_LOG_LEVEL: info
Expand Down