From 58370e6efd3fa560bc81b875cf7aed3072a94147 Mon Sep 17 00:00:00 2001 From: Mark McLaughlin Date: Fri, 9 Feb 2024 15:47:49 +0000 Subject: [PATCH] Fixed config so rebac connects to spicedb properly on local. --- configs/config.yaml | 4 ++-- docker-compose.yaml | 10 ++++++++-- spicedb/teardownrebac.sh | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/configs/config.yaml b/configs/config.yaml index 3c3dbc1..6460a6d 100644 --- a/configs/config.yaml +++ b/configs/config.yaml @@ -8,5 +8,5 @@ server: data: spiceDb: useTLS: false - endpoint: localhost:50051 - tokenFile: spicedb_pre_shared + endpoint: spicedb:50051 + tokenFile: /spicedb_pre_shared diff --git a/docker-compose.yaml b/docker-compose.yaml index 48e9cf1..7267c73 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,8 +1,10 @@ -version: "3" +version: "3.8" services: rebac: image: "quay.io/ciam_authz/insights-rebac:latest" + configs: + - spicedb_pre_shared build: dockerfile: Dockerfile profiles: ["rebac"] @@ -42,4 +44,8 @@ services: - "5432:5432" environment: - "POSTGRES_PASSWORD=${POSTGRES_PASSWORD}" - - "POSTGRES_DB=${POSTGRES_DBNAME}" \ No newline at end of file + - "POSTGRES_DB=${POSTGRES_DBNAME}" + +configs: + spicedb_pre_shared: + environment: "SPICEDB_GRPC_PRESHARED_KEY" diff --git a/spicedb/teardownrebac.sh b/spicedb/teardownrebac.sh index 66f8e01..2d82dcf 100755 --- a/spicedb/teardownrebac.sh +++ b/spicedb/teardownrebac.sh @@ -1,3 +1,3 @@ #!/bin/bash set -e -docker-compose --profile rebac -f ./spicedb/docker-compose.yaml down \ No newline at end of file +docker-compose --env-file ./spicedb/.env --profile rebac -f docker-compose.yaml down \ No newline at end of file