Host OpenFGA | No Template Available

10 months 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

10 months ago

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

16 Replies

10 months ago

N/A


10 months ago

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


10 months 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

10 months 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

10 months ago

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


aaguiarz
HOBBY

10 months 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

10 months 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

10 months 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?

10 months ago

  • Template and Service Icons

  • Naming Conventions

  • Health Checks


brody

Template and Service IconsNaming ConventionsHealth Checks

aaguiarz
HOBBY

10 months ago


10 months 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

10 months ago

That Worked, Thank you


brody

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

aaguiarz
HOBBY

10 months ago

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


10 months ago

Looks like it is missing a health check?


Status changed to Awaiting User Response Railway 10 months ago


brody

Looks like it is missing a health check?

aaguiarz
HOBBY

10 months ago

Should be ready now


Status changed to Awaiting Railway Response Railway 10 months ago


10 months 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 10 months ago


Status changed to Solved brody 10 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...