summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Dockerfile6
-rw-r--r--Procfile3
-rwxr-xr-xbin/spicedb8
3 files changed, 15 insertions, 2 deletions
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 $@