简体   繁体   English

如何使用 Docker 映像将 Node.js HTTP/2 应用程序部署到 Google Compute Engine 上?

[英]How do I deploy a Node.js HTTP/2 application onto Google Compute Engine using a Docker image?

This used to work until a week ago, when the VM ran out of memory due to a missing finally in a try-catch.这一直有效,直到一周前,VM 用完 memory,因为 try-catch 最终丢失。 So, I tried to re-deploy with this fix to a new instance and now nothing is working.因此,我尝试将此修复程序重新部署到新实例,但现在没有任何效果。

Here is the git repository of the server: https://gitlab.com/pumpkin-spice-latte/psl-server这是服务器的 git 存储库: https://gitlab.com/pumpkin-spice-latte/psl-server

I use the GCP console shell to build and push the image.我使用 GCP 控制台 shell 来构建和推送镜像。 It is on the VM with the container available and running.它位于容器可用且正在运行的 VM 上。 However, when I try to connect to the external IP address, nothing is there.但是,当我尝试连接到外部 IP 地址时,什么都没有。 https://35.203.160.44/ https://35.203.160.44/

Here is a screenshot of the docker ps & docker images : docker-ps-docker-images这是docker psdocker images的屏幕截图:docker -ps-docker-images

Here is a screenshot of the Firewall Rules : firewall-rules这是Firewall Rules的屏幕截图: firewall-rules

Halp!!!!哈!!!! lol哈哈

I cloned the repo locally and found a typo in the port:我在本地克隆了 repo,并在端口中发现了一个错字:

const PORT =
  process.env.PORT || (process.env.NODE_ENV !== 'production' ? 8443 : 433); // should be 443

I think you meant 443 instead of 433.我认为您的意思是 443 而不是 433。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Google Compute Engine上部署节点应用程序? - How do I deploy a node app on Google Compute Engine? 如何使用Amazon EC2容器服务将docker node.js应用程序部署到Amazon EC2 - How to deploy docker node.js application onto Amazon EC2 with Amazon EC2 container service 在Google Compute Engine上使用gcloud安装node.js - install node.js using gcloud on Google Compute Engine 如何使用 Google Cloud Compute Engine 为 Node.JS 应用程序配置端口转发 - How to configure Port Forwarding with Google Cloud Compute Engine for a Node.JS application Google Compute Engine上的Node.js - Node.js on Google Compute Engine 如何在谷歌计算引擎上将 node.js 连接到 mysql? - How to connect node.js to mysql on google compute engine? 如何将 Node.js 应用程序从 GitHub 部署到 Google App Engine? - How do you deploy a Node.js app from GitHub to Google App Engine? 如何将 Node HTTP/2 服务器部署到 Google App Engine? - How can I deploy a Node HTTP/2 server to Google App Engine? ffmpeg如何获取持续时间到node.js? - ffmpeg how do I get the duration onto the node.js? 无法加载默认凭据? (Node.js 谷歌计算引擎) - Could not load the default credentials? (Node.js Google Compute Engine)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM