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.
Pinned Solution
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
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.
10 months ago
I just created one here https://railway.com/deploy/openfga, let me know if that works for you
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?
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>
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 Icons * Naming Conventions * Health Checks
10 months ago
- I changed the name to OpenFGA
- Documented the variable to configure for authentication
- Added health check
- The icon seems to be fine (https://raw.githubusercontent.com/openfga/community/refs/heads/main/brand-assets/icon/color/openfga-icon-color.svg)
- The service name
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.
10 months ago
Thanks, I found how to change it (not super obvious :)). Let me know if if looks good
Status changed to Awaiting User Response Railway • 10 months ago
brody
Looks like it is missing a health check?
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