5 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.
16 Replies
5 months ago
N/A
5 months ago
Based on which commands there is a post build command that can be executed in container
5 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 startdid this based on https://docs.railway.com/guides/start-command
Attachments
5 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.
5 months ago
I just created one here https://railway.com/deploy/openfga, let me know if that works for you
5 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
5 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
5 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?
5 months ago
Template and Service Icons
Naming Conventions
Health Checks
brody
Template and Service IconsNaming ConventionsHealth Checks
5 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
5 months ago
That Worked, Thank you
brody
The OpenFGA service does not have an icon at this time.
5 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 • 5 months ago
brody
Looks like it is missing a health check?
5 months ago
Should be ready now
Status changed to Awaiting Railway Response Railway • 5 months ago
5 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 • 5 months ago
Status changed to Solved brody • 5 months ago