初始加载后的 AWS Fargate 502 错误网关

问题描述

我一直在关注 Fargate/docker 教程:https://medium.com/containers-on-aws/building-a-socket-io-chat-app-and-deploying-it-using-aws-fargate-86fd7cbce13f

这是我的 Dockerfile

FROM mhart/alpine-node:15 AS build
WORKDIR /srv
ADD package.json .
RUN yarn
ADD . .

FROM mhart/alpine-node:base-9
COPY --from=build /srv .
EXPOSE 3000
CMD ["node","index.js"]

我有两个 Fargate 堆栈

production 是从 AWS CloudFormation public-service template

创建的

chat 是从 AWS CloudFormation public-vpc template 创建的,并替换了教程中的一些参数:

enter image description here

生产堆栈公开了一个有效的 ExternalUrl 输出参数

enter image description here

当我打开 URL 时,我可以看到索引的初始加载成功

enter image description here

但资源以 502(坏网关)响应

enter image description here

如果我刷新 URL,索引也会抛出错误

enter image description here

我是 AWS 和 Fargate 的新手。是否有我应该检查的服务器日志?这可能是我用于设置的模板(public-vpc.ymlpublic-service.yml)的问题吗?感谢您提供任何帮助 - 谢谢。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)