diff options
| author | mo khan <mo@mokhan.ca> | 2025-07-21 16:20:32 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-07-21 16:20:32 -0600 |
| commit | 44e0d272c040cdc53a98b9f1dc58ae7da67752e6 (patch) | |
| tree | 1d7d676bd96b37c4c042f4ddf0ef89cbe69a5fb0 | |
| parent | 01c0c7624a64d80c56862770bbededfa35977b2e (diff) | |
chore: install spicedb
| -rw-r--r-- | Dockerfile | 6 | ||||
| -rw-r--r-- | Procfile | 3 | ||||
| -rwxr-xr-x | bin/spicedb | 8 |
3 files changed, 15 insertions, 2 deletions
@@ -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 @@ -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 $@ |
