generated from ZEISS/template-go
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4d3366a
commit c799e2c
Showing
10 changed files
with
666 additions
and
1,830 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
inpackage: True | ||
with-expecter: true | ||
dir: mocks | ||
packages: | ||
testonly: True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,58 @@ | ||
services: | ||
crdb: | ||
image: cockroachdb/cockroach:latest-v24.1 | ||
postgres: | ||
image: postgres:14 | ||
container_name: postgres | ||
command: postgres -c 'max_connections=100' | ||
networks: | ||
- default | ||
ports: | ||
- "26257:26257" | ||
- "8082:8080" | ||
command: start-single-node --insecure | ||
volumes: | ||
- crdb:/cockroach/cockroach-data | ||
- "5432:5432" | ||
environment: | ||
- POSTGRES_USER=postgres | ||
- POSTGRES_PASSWORD=password | ||
healthcheck: | ||
test: ["CMD", "curl", "-f", "http://localhost:8080/health?ready=1"] | ||
interval: 3s | ||
timeout: 3s | ||
test: ["CMD-SHELL", "pg_isready -U postgres"] | ||
interval: 5s | ||
timeout: 5s | ||
retries: 5 | ||
|
||
migrate: | ||
depends_on: | ||
crdb: | ||
postgres: | ||
condition: service_healthy | ||
image: openfga/openfga:latest | ||
container_name: migrate | ||
command: migrate | ||
environment: | ||
- OPENFGA_DATASTORE_ENGINE=postgres | ||
- OPENFGA_DATASTORE_URI=postgres://root@crdb:26257/defaultdb?sslmode=disable | ||
- OPENFGA_DATASTORE_URI=postgres://postgres:password@postgres:5432/postgres?sslmode=disable | ||
command: migrate | ||
networks: | ||
- default | ||
|
||
openfga: | ||
depends_on: | ||
migrate: | ||
condition: service_completed_successfully | ||
image: openfga/openfga:latest | ||
container_name: openfga | ||
command: run | ||
environment: | ||
- OPENFGA_DATASTORE_ENGINE=postgres | ||
- OPENFGA_DATASTORE_URI=postgres://root@crdb:26257/defaultdb?sslmode=disable | ||
- OPENFGA_LOG_FORMAT=json | ||
command: run | ||
- OPENFGA_DATASTORE_URI=postgres://postgres:password@postgres:5432/postgres?sslmode=disable | ||
- OPENFGA_DATASTORE_MAX_OPEN_CONNS=100 #see postgres container | ||
- OPENFGA_PLAYGROUND_ENABLED=true | ||
networks: | ||
- default | ||
ports: | ||
# Needed for the http server | ||
- "8080:8080" | ||
# Needed for the grpc server (if used) | ||
- "8081:8081" | ||
# Needed for the playground (Do not enable in prod!) | ||
- "3000:3000" | ||
- "8080:8080" #http | ||
- "8081:8081" #grpc | ||
- "3000:3000" #playground | ||
- "2112:2112" #prometheus metrics | ||
healthcheck: | ||
test: ["CMD", "/usr/local/bin/grpc_health_probe", "-addr=openfga:8081"] | ||
interval: 5s | ||
timeout: 30s | ||
retries: 3 | ||
|
||
volumes: | ||
crdb: |
Oops, something went wrong.