Nlea
Explore posts from serversCDCloudflare Developers
•Created by Nlea on 11/14/2024 in #workers-help
How to access environment variables in Cloudflare Workers when using RPC binding
@Skye, thanks for pointing that out! While I used
this.env
within the fetch function to pass the env
parameter to the send function, it didn’t occur to me that I don’t actually need the env
parameter—I can simply declare it within the send function 🤦♀️ . I think I had a big mental block there. Thanks for helping me untangle it!2 replies
Connecting prometheus instance with python app via internal network
Hey @Brody , it is me again. I have now a second app I would like to connect to my running Prometheus instance on Railway.
The Dockerfile uses:
CMD uvicorn main:app --host='::' --port=$PORT
And I set an Enviroment variable via the railway UI :
PORT = 8000
In the Prometheus yaml I specified a second target:
- targets: ['fastapi-on-railway.railway.internal:8000']
I see that the Prometheus instance tries to connect to the new target but it gets the following error:
Get "http://fastapi-on-railway.railway.internal:8000/metrics": dial tcp [fd12:860e:5888::b:ab40:b92b]:8000: connect: connection refused
I think I did everything the same as for the first application but I wondering why I can't connect it towards the second app. Am I missing something? Do you maybe have an idea?26 replies
Connecting prometheus instance with python app via internal network
It works if I set the Variable Port to 8080 manually in the railway UI... but also now the public domain is not working anymore and I get back an "application failed" error.
Do you might have an idea how both points can work?
26 replies