From 44e0d272c040cdc53a98b9f1dc58ae7da67752e6 Mon Sep 17 00:00:00 2001 From: mo khan Date: Mon, 21 Jul 2025 16:20:32 -0600 Subject: chore: install spicedb --- Dockerfile | 6 +++++- Procfile | 3 ++- bin/spicedb | 8 ++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100755 bin/spicedb diff --git a/Dockerfile b/Dockerfile index f0e5727..8f15cba 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,6 +8,9 @@ RUN apt-get update && apt-get install -y wget && \ wget -O /usr/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.5/dumb-init_1.2.5_x86_64 && \ chmod +x /usr/bin/dumb-init +# Build stage for getting SpiceDB binary +FROM authzed/spicedb:latest AS spicedb-binary + # Build stage for sparkle FROM golang:1.24-alpine AS build ENV CGO_ENABLED=0 @@ -24,8 +27,9 @@ WORKDIR / USER root RUN ["/busybox/sh", "-c", "ln -s /busybox/sh /bin/sh"] USER nonroot -COPY --from=envoy-binary /usr/local/bin/envoy /bin/envoy COPY --from=dumb-init-builder /usr/bin/dumb-init /bin/dumb-init +COPY --from=envoy-binary /usr/local/bin/envoy /bin/envoy +COPY --from=spicedb-binary /usr/local/bin/spicedb /bin/spicedb COPY --from=build /app/Procfile /Procfile COPY --from=build /app/bin/envoy-shim /bin/envoy-shim COPY --from=build /app/etc/envoy /etc/envoy diff --git a/Procfile b/Procfile index e38579b..0c7e5a7 100644 --- a/Procfile +++ b/Procfile @@ -1,3 +1,4 @@ -envoy: ./bin/envoy-shim authzd: ./bin/authzd +envoy: ./bin/envoy-shim sparkled: ./bin/sparkled +spicedb: ./bin/spicedb serve --grpc-preshared-key "secret" --http-addr :8081 --grpc-addr :50051 --datastore-engine memory --log-level warn --log-format json --telemetry-endpoint "" --skip-release-check diff --git a/bin/spicedb b/bin/spicedb new file mode 100755 index 0000000..5d4cf0b --- /dev/null +++ b/bin/spicedb @@ -0,0 +1,8 @@ +#!/bin/sh + +if ! command -v spicedb >/dev/null 2>&1; then + echo "Install spicedb: https://authzed.com/docs/spicedb/getting-started/installing-spicedb" + exit 1 +fi + +exec spicedb $@ -- cgit v1.2.3