Unverified Commit b7eb6d43 authored by Mohamed A. Salah's avatar Mohamed A. Salah Committed by GitHub

set hostname to 0.0.0.0 (#54342)

When I try to deploy to Google Cloud Run it fails after some
investigation I saw this line in

.next/standalone/server.js
```javascript
const hostname = process.env.HOSTNAME || 'localhost'
``` 
This some how make this log when i run docker 
```shell
- ready started server on 172.17.0.2:3000, url: http://172.17.0.2:3000
``` 
I don't know why it's logging this address even if the server running on
localhost.

So this my fix
Set hostname to 0.0.0.0 to avoid deployment failing on Google cloud run.
parent 3bce82e8
......@@ -55,5 +55,7 @@ USER nextjs
EXPOSE 3000
ENV PORT 3000
# set hostname to localhost
ENV HOSTNAME "0.0.0.0"
CMD ["node", "server.js"]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment