Deploying nginx with RTMP

I need to deploy a docker image where nginx+rtmp module run. I can deploy it but I I’m not sure it’s running and when I try to connect to it, connection fails.

This is my fly.toml file

app = "rtmp"
primary_region = "ams"

[build]
  dockerfile = "Dockerfile.rtmp"


[[services]]
  internal_port = 1935
  protocol = "tcp"
  auto_stop_machines = true
  auto_start_machines = true
  min_machines_running = 0
  [[services.ports]]
    handlers = []
    port = 1935
  [[services.tcp_checks]]
    grace_period = "1s"
    interval = "1m"
    restart_limit = 0
    timeout = "2s"

[services.concurrency]
  type = "connections"
  hard_limit = 25
  soft_limit = 20

My docker file is basically something on this line

FROM tiangolo/nginx-rtmp:latest
...

That image runs nginx with the RTMP module enabled. When I deploy it the machines appears as paused.

Hi,

If the machine is showing as paused, rather than running, I’d assume not. It might be worth (at least initially) setting the min_machines_running as 1 to keep a machine around, even when not active, at least for initial debugging.

Armed with a running machine, you could SSH in to the app to see what’s running/not:

Once in check what processes are supposed to be running (sounds like nginx), check its logs for any errors (nginx would normally output a default log to some path in nginx.conf), whether it is in fact listening on port 1935 … and so on. That way you’ll get some visibility into what’s actually happening.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.