a year ago
Hello Team,
I am working on deploying two services on Railway:
Export-Claim-Api: A FastAPI-based service.
Adjuster-Copilot-Portal: A service that needs to interact with the Export-Claim-Api service through its private Railway URL.
I am encountering difficulties connecting the Adjuster-Copilot-Portal to the Export-Claim-Api service using the private Railway URL. I would like guidance on how to establish this connection securely and effectively.
Specifically, I need assistance with the following:
Private Railway URL: How do I obtain the private URL for the Export-Claim-Api service?
Configuration: How do I securely configure the Adjuster-Copilot-Portal service to interact with the Export-Claim-Api service using the private URL? Should I set it up using environment variables, or is there a preferred Railway-specific approach?
Networking: Are there any specific network configurations, access controls, or permissions required within Railway to enable this connection?
For context, the Export-Claim-Api service is listening on port 8000, and I’d like to ensure the private Railway URL routes traffic correctly to this port.
Thank you in advance for your assistance! Please let me know if additional details or configuration specifics are required.
Thanks and Regards,
Megha
3 Replies
a year ago
Hello,
1. CLAIM_EXPORTER_BACKEND_ENDPOINT=http://${{export-claim-api.RAILWAY_PRIVATE_DOMAIN}}:${{export-claim-api.PORT}}
2. You were very close with your original reference variable, the variable above is what you want to use, reference variables are best practice on Railway. Additionally, you will need to set PORT=8000 on the export-claim-api service.
3. Yes there is, your FastAPI service needs to listen on IPv6 since the private network is IPv6 only, we have docs on how to do this for FastAPI, check that here - https://docs.railway.com/guides/private-networking#python--uvicorn
Please let me know if you need clarification on anything else, and if you are still running into errors, please provide the errors.
Status changed to Awaiting User Response Railway • about 1 year ago
a year ago
Hello Team,
Thank you for the Suggestion, we have updated the configuration of export-claim-api service and it is working fine
Thanks and Regards,
Megha
Status changed to Awaiting Railway Response Railway • about 1 year ago
Status changed to Awaiting User Response Railway • about 1 year ago
Status changed to Solved brody • about 1 year ago