微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Google App Engine - 自定义 docker 映像出现 502 错误

如何解决Google App Engine - 自定义 docker 映像出现 502 错误

我似乎无法让我的 Craft CMS 容器在 Google App Engine 中运行。我正在使用自定义 Dockerfile 在本地构建映像并将映像推送到我的项目容器注册表。

部署正常,/Nginx_health 检查在日志中显示为 200,但每次我导航到浏览器中的页面时,我都会在 GAE 浏览器控制台中看到 502 和以下错误消息:

[error] 34#34: *320 connect() Failed (111: Connection refused) while connecting to upstream,client: 2607:f8b0:4007:818::2014,server:,request: "GET / HTTP/1.1",upstream: "http://172.17.0.1:8080/",host: "craft-cms.uw.r.appspot.com" 

我在 Dockerfile 中暴露了端口 8080。

这是我的 app.yaml

runtime: custom
env: flex

runtime_config:
    document_root: craftcms/web

vm_health_check:
 enable_health_check: False

manual_scaling:
  instances: 1

我的 Nginx-app.conf 文件

location / {
  # try to serve file directly,fallback to front controller
  try_files $uri /index.PHP$is_args$args;
}

不确定这是否重要,但这就是我关闭 Dockerfile 的方式:

RUN /scripts/run.sh

copY ./config-env/supervisord.conf /etc/supervisord.conf
copY ./config-env/PHP-fpm.conf /usr/local/etc/PHP-fpm.conf
CMD ["/usr/bin/supervisord","-n"]

run.sh 为 Craft 做了一些繁忙的工作,将配置文件复制过来,然后我明确调用 supervisord。

我在浏览器中看到的只是 502/Nginx 页面。关于我可以尝试的其他事情的想法?

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。