Host OpenFGA | No Template Available

a year ago

Docs: https://openfga.dev/

https://openfga.dev/docs/getting-started/setup-openfga/docker

It requires some commands to be ran after the container starts, not sure how to do it in railway.

Solved$40 Bounty

Pinned Solution

aaguiarz
HOBBY

a year ago

I just created one here https://railway.com/deploy/openfga, let me know if that works for you

16 Replies

a year ago

N/A


a year ago

Based on which commands there is a post build command that can be executed in container


a year ago

`/bin/sh -ecx \"exec openfga run --datastore-engine postgres --datastore-uri $OPENFGA_DATASTORE_URI\"`

I tried this as custom startup command but it fails to start

did this based on https://docs.railway.com/guides/start-command

Attachments


turborx
FREE

a year ago

hi, you can’t run extra commands after startup on railway directly, but you can stitch them into your start command or use a postdeploy script in railway.json. for example:

{

"start": "/bin/sh -ecx \"openfga migrate --datastore-engine postgres --datastore-uri $OPENFGA_DATASTORE_URI && exec openfga run --datastore-engine postgres --datastore-uri $OPENFGA_DATASTORE_URI\""

}

then redeploy and it’ll migrate first, then start the server.


aaguiarz
HOBBY

a year ago

I just created one here https://railway.com/deploy/openfga, let me know if that works for you


aaguiarz
HOBBY

a year ago

I configured with:

pre-deploy command: ./openfga migrate

custom start command: ./openfga run


aaguiarz

I just created one here <https://railway.com/deploy/openfga>, let me know if that works for you

a year ago

Hey,

Do you think you could take a look at our best practices page and update your template accordingly?

https://docs.railway.com/guides/templates-best-practices


brody

Hey, Do you think you could take a look at our best practices page and update your template accordingly? <https://docs.railway.com/guides/templates-best-practices>

aaguiarz
HOBBY

a year ago

Sure! Looking at the list, it seems I missed describing the input variable for authentication. Is there anything else I missed?


aaguiarz

Sure! Looking at the list, it seems I missed describing the input variable for authentication. Is there anything else I missed?

a year ago

  • Template and Service Icons
  • Naming Conventions
  • Health Checks

brody

* Template and Service Icons * Naming Conventions * Health Checks

aaguiarz
HOBBY

a year ago


a year ago

The OpenFGA service does not have an icon at this time.


aaguiarz

I just created one here <https://railway.com/deploy/openfga>, let me know if that works for you

a year ago

That Worked, Thank you


brody

The `OpenFGA` service does not have an icon at this time.

aaguiarz
HOBBY

a year ago

Thanks, I found how to change it (not super obvious :)). Let me know if if looks good


a year ago

Looks like it is missing a health check?


Status changed to Awaiting User Response Railway about 1 year ago


brody

Looks like it is missing a health check?

aaguiarz
HOBBY

a year ago

Should be ready now


Status changed to Awaiting Railway Response Railway about 1 year ago


a year ago

Awsome.

Thank you for the template, and thank you for putting up with all my nits!

The $40 bounty has been awarded to you.


Status changed to Awaiting User Response Railway about 1 year ago


Status changed to Solved brody about 1 year ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...