Help with Connections from my website

I want to create a web application using a pod but I don't know how I can make connections from my website if every time I restart the pod the IP and TCP port mapping change. Any experience with this? Any tutorial? Thank you so much!
Solution:
IP and TCP port can be accessed from env variable so you can figure something out to pass them into your other code this...
Jump to solution
9 Replies
mc_deimon
mc_deimonOP6mo ago
Thank you!!! I'm going to look into this.
Solution
nerdylive
nerdylive6mo ago
IP and TCP port can be accessed from env variable so you can figure something out to pass them into your other code this
nerdylive
nerdylive6mo ago
Pod environment variables | RunPod Documentation
Configure and manage your pods with these essential environment variables, including pod ID, API key, host name, GPU and CPU count, public IP, SSH port, data center ID, volume ID, CUDA version, current working directory, PyTorch version, and public SSH key.
mc_deimon
mc_deimonOP6mo ago
nerdylive
nerdylive6mo ago
ur welcome
mc_deimon
mc_deimonOP6mo ago
I just realized that I use storage for my pods so I create a pod every time I go out. I guess this approach won't work then, right?
nerdylive
nerdylive6mo ago
I think it does, why not? not clear of how do you use it
mc_deimon
mc_deimonOP6mo ago
If I have not misunderstood when I create a pod again, the ip and port mapping changes. My website hosted on an external server cannot call the Runpod IP because it has changed and it does not know what IP my pod has. I can't access the environment variables from outside.
nerdylive
nerdylive6mo ago
Ohh, access it from local, from the pod, python code will work too The easiest way is to get your website's public ip and connect from your pod to your website Just send it via http
Want results from more Discord servers?
Add your server