Container Contract says, cloud run should listen to the port defined by PORT
environment variable. The environment variable is set to 8080
. My question is can we change this variable to different port?
1
votes
5 Answers
4
votes
4
votes
3
votes
From Documentation:
The container must listen for requests on 0.0.0.0 on the port defined by the PORT environment variable.
In Cloud Run container instances, the
PORT
environment variable is always set to 8080, but for portability reasons, your code should not hardcode this value.
Your existing applications must listen on PORT environment variable to work on Cloud Run, as specified on the documentation.
0
votes