You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to deploy OpenFGA with a Postgres database back-end and have it fully automated. Think "infrastructure as code" with Puppet, Chef, or AWS. For my use case, I'm using CDK on AWS.
Likely steps:
Deploy database
Run "openfga migrate" to create tables <-- problem
Start OpenFGA container
Create Store if it doesn't exist
Deploy my model to the store
I can't find a way to migrate (create db tables, etc.) programmatically. There's no API available I can see, and the SDK doesn't include anything. The OpenFGA container will fail if the tables don't exist at startup, so the migration has to precede OpenFGA startup.
Ideally, I could run the container with something like this:
docker run -p 8080:8080 ... openfga/openfga:latest run --auto-db-migrate
My current solution is to abandon the benefits of the container being built on chainguard, create a custom image with a built-in shell, and have the entrypoint run "bash -c '/openfga migrate && /openfga run'".
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'd like to deploy OpenFGA with a Postgres database back-end and have it fully automated. Think "infrastructure as code" with Puppet, Chef, or AWS. For my use case, I'm using CDK on AWS.
Likely steps:
openfga migrate" to create tables <-- problemI can't find a way to migrate (create db tables, etc.) programmatically. There's no API available I can see, and the SDK doesn't include anything. The OpenFGA container will fail if the tables don't exist at startup, so the migration has to precede OpenFGA startup.
Ideally, I could run the container with something like this:
My current solution is to abandon the benefits of the container being built on chainguard, create a custom image with a built-in shell, and have the entrypoint run "
bash -c '/openfga migrate && /openfga run'".Other thoughts?
Beta Was this translation helpful? Give feedback.
All reactions