我正在测试Azure Service App服务以在Nodejs中部署应用程序(前面是nextjs,后面是nestjs)。我在 Linux 中创建了该实例,并将我的代码链接到 GitHub 以将其与 GitHub 操作一起使用。我遇到的问题是,在我的代码中,我没有将其设置为使用任何特定端口,我让 Azure 将其分配给我,但它给了我以下错误:

错误 – 容器 xxx 未响应端口 8080 上的 HTTP ping,站点启动失败。请参阅容器日志进行调试。错误 2024-03-20T20:52:48.487 错误 – 站点 costosapp-prueba 的容器 xxx 已退出,站点启动失败

就我而言,我没有在代码中使用 Dockerfile,但显然 Linux 在内部创建了一个容器来托管应用程序。我尝试从代码中手动将端口分配给我的应用程序,我什至使用 Dockerfile 尝试公开端口,但一切总是会导致相同的结果。

你知道我做错了什么吗?注册实例并不复杂。我什至遵循教程并执行完全相同的步骤并遇到相同的问题。请帮帮我? 🙂

我已经尝试为代码分配端口,我尝试使用 Dockerfile,我什至向应用程序添加了环境变量,但我仍然得到相同的结果。

2

  • 您是否正在尝试通过 GitHub 将 Web 应用程序部署到 azure 应用程序服务,我是否正确?


    – 

  • 如果可以的话,能否提供一下github仓库。


    – 

$(document).ready(function() {
$(“.js-gps-inline-related-questions .spacer”).click(function () {
fireRelatedEvent($(this).index() + 1, $(this).data(‘question-id’));
});

function fireRelatedEvent(position, questionId) {
StackExchange.using(“gps”, function() {
StackExchange.gps.track(‘related_questions.click’,
{
position: position,
originQuestionId: 78208917,
relatedQuestionId: +questionId,
location: ‘inline’,
source: ‘Baseline_Fallback’
});
});
}
});

function toggleInlineRelated(showMore) {
var inlineRelatedLess = document.getElementById(“inline_related_var_a_less”);
var inlineRelatedMore = document.getElementById(“inline_related_var_a_more”);

var inlineRelatedSeeMore = document.getElementById(“inline_related_see_more”);
var inlineRelatedSeeLess = document.getElementById(“inline_related_see_less”);

if (showMore) {
inlineRelatedLess.classList.add(“d-none”);
inlineRelatedSeeMore.classList.add(“d-none”);

inlineRelatedMore.classList.remove(“d-none”);
inlineRelatedSeeLess.classList.remove(“d-none”);
}
else {
inlineRelatedMore.classList.add(“d-none”);
inlineRelatedSeeLess.classList.add(“d-none”);

inlineRelatedLess.classList.remove(“d-none”);
inlineRelatedSeeMore.classList.remove(“d-none”);
}
}

0