我如何 运行 Azure 上的 Sidekiq?
How do I run Sidekiq on Azure?
我在 Rails 上有一个 Ruby 应用程序与 Sidekiq。我 运行 它在 Heroku 上使用了多年,用于 Web 服务器的 web dynos 和用于 Sidekiq 的 worker dynos (https://devcenter.heroku.com/articles/background-jobs-queueing)。
我设法使 Web 服务器在 Azure 上运行,非常简单。
我现在无法让 Sidekiq 在 Azure 上运行。 Azure 上似乎不存在工作者的概念(由 Heroku 定义)。
这是我到目前为止所做的:
我尝试使用以下启动命令为容器配置 Web 应用程序:bundle exec sidekiq -C config/sidekiq.yml
- sidekiq 启动但由于容器无法处理来自 Azure 的 HTTP ping(健康检查)(因为 sidekiq 不是 Web 服务器),容器自动关闭 (
Container didn't respond to HTTP pings on port: XXXX
)
- 没有停用 HTTP ping 的选项 => https://docs.microsoft.com/fr-fr/archive/blogs/waws/things-you-should-know-web-apps-and-linux#your-container-must-respond-to-an-http-pingapplies-to-web-app-for-containers
我尝试使用 docker-compose 配置 Web 应用程序:
services:
web:
image: "myregistry.azurecr.io/myimage:latest"
ports:
- 80:80
sidekiq:
image: "myregistry.azurecr.io/myimage:latest"
command: bundle exec sidekiq -C config/sidekiq.yml
with docker compose,两个服务(web + sidekiq)都正确启动,但几分钟后,我有以下错误:ERROR - multi-container unit was not started successfully
没有更多细节。
我终于尝试配置一个容器实例:https://azure.microsoft.com/fr-fr/services/container-instances/
- 我不知道容器启动后如何执行 sidekiq
有没有人设法让 sidekiq 在 Azure 上运行?
谢谢!
https://github.com/arturictus/sidekiq_alive 解决了 Container didn't respond to HTTP pings on port: XXXX
问题!
我在 Rails 上有一个 Ruby 应用程序与 Sidekiq。我 运行 它在 Heroku 上使用了多年,用于 Web 服务器的 web dynos 和用于 Sidekiq 的 worker dynos (https://devcenter.heroku.com/articles/background-jobs-queueing)。
我设法使 Web 服务器在 Azure 上运行,非常简单。
我现在无法让 Sidekiq 在 Azure 上运行。 Azure 上似乎不存在工作者的概念(由 Heroku 定义)。
这是我到目前为止所做的:
我尝试使用以下启动命令为容器配置 Web 应用程序:
bundle exec sidekiq -C config/sidekiq.yml
- sidekiq 启动但由于容器无法处理来自 Azure 的 HTTP ping(健康检查)(因为 sidekiq 不是 Web 服务器),容器自动关闭 (
Container didn't respond to HTTP pings on port: XXXX
) - 没有停用 HTTP ping 的选项 => https://docs.microsoft.com/fr-fr/archive/blogs/waws/things-you-should-know-web-apps-and-linux#your-container-must-respond-to-an-http-pingapplies-to-web-app-for-containers
- sidekiq 启动但由于容器无法处理来自 Azure 的 HTTP ping(健康检查)(因为 sidekiq 不是 Web 服务器),容器自动关闭 (
我尝试使用 docker-compose 配置 Web 应用程序:
services: web: image: "myregistry.azurecr.io/myimage:latest" ports: - 80:80 sidekiq: image: "myregistry.azurecr.io/myimage:latest" command: bundle exec sidekiq -C config/sidekiq.yml
with docker compose,两个服务(web + sidekiq)都正确启动,但几分钟后,我有以下错误:
ERROR - multi-container unit was not started successfully
没有更多细节。我终于尝试配置一个容器实例:https://azure.microsoft.com/fr-fr/services/container-instances/
- 我不知道容器启动后如何执行 sidekiq
有没有人设法让 sidekiq 在 Azure 上运行? 谢谢!
https://github.com/arturictus/sidekiq_alive 解决了 Container didn't respond to HTTP pings on port: XXXX
问题!