Skip to content

Commit

Permalink
build: add rockcraft.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
nsklikas committed Oct 18, 2023
1 parent 0d6c7c6 commit 5722c87
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions rockcraft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: openfga
base: bare
build-base: ubuntu:22.04
version: "1.3.3"
summary: Openfga Authorization Server
description: |
OpenFGA is a flexible Authorization system inspired by Google's Zanzibar, designed for reliability and low latency at scale.
license: Apache-2.0
run-user: _daemon_
platforms:
amd64:

services:
openfga:
override: replace
command: openfga run
startup: disabled
checks:
up:
override: replace
level: alive
exec:
command: grpc_health_probe -addr localhost:8081


parts:
util:
plugin: nil
stage-packages:
# This is needed to pipe the stdout/stderr to a file for log forwarding
- coreutils
prime:
- usr/bin/tee

shell:
plugin: nil
stage-packages:
# This is needed to pipe the stdout/stderr to a file for log forwarding
- dash

sed:
plugin: nil
stage-packages:
- sed

openfga:
plugin: go
build-snaps:
- go/1.21/stable
build-environment:
- CGO_ENABLED: 0
source: https://github.com/openfga/openfga
source-type: git
source-tag: v1.3.3
override-build: |
go build -o ${CRAFT_PART_INSTALL}/bin/openfga ./cmd/openfga
grpc_health_probe:
plugin: go
build-snaps:
- go/1.21/stable
build-environment:
- CGO_ENABLED: 0
source: https://github.com/grpc-ecosystem/grpc-health-probe
source-type: git
source-tag: v0.4.21
override-build: |
go build -a -tags netgo -ldflags=-w -o ${CRAFT_PART_INSTALL}/bin/grpc_health_probe

0 comments on commit 5722c87

Please sign in to comment.