can't deploy

I’m trying to launch my node app and it seems to be stuck in the same place each time I try and deploy it

flyctl launch
Update available 0.0.316 -> v0.0.333.
Run "flyctl version update" to upgrade.
An existing fly.toml file was found for app divine-sun-6758
App is not running, deploy...
Deploying divine-sun-6758
==> Validating app configuration
--> Validating app configuration done
Services
TCP 80/443 ⇢ 8080
Remote builder fly-builder-wild-shape-805 ready
==> Building image with Buildpacks
--> docker host: 20.10.12 linux x86_64
20: Pulling from heroku/buildpacks
Digest: sha256:4da35b2342282fdf86f9d9d804df559e6d63cec1412adeda3d86857d523549cb
Status: Image is up to date for heroku/buildpacks:20
20-cnb: Pulling from heroku/heroku
Digest: sha256:e245a61ac1f01b47d66e362f220548e3e8874b7395129adb481ee0f081a265e6
Status: Image is up to date for heroku/heroku:20-cnb

I’ve tried deleting the app (and db) on the dashboard but that hasn’t made any difference. I still can’t run flyctl launch without it hanging after outputting that the heroku image is up to date

Still battling this issue. I tried deleting the builder but even with a new builder, the deploy hangs. eventually the CLI timeout. Not sure what else to try.

Status: Downloaded newer image for heroku/heroku:20-cnb
Error executing lifecycle: io: read/write on closed pipe

Can you check if you have large files/dirs in your project directory? Anything large should be added to a file named .dockerignore, except node_modules which should be ignored already.

that was it. I didn’t have a .dockerignore so created one an added node_modules. I’m new to Fly and this feels like a newbie issue. I’m wondering if it might be helpful if Flyctl was enhanced to be smart enough to detect / handle this common case?

OK, the next problem I have is the app is not accessible externally. I can flyctl ssh console and do a curl localhost:8080 and it works. but I can’t access it remotely and also during the deploy the health check fails.

This is my toml file


app = "long-frog-5996"
kill_signal = "SIGINT"
kill_timeout = 5
processes = []

[build]
  builder = "heroku/buildpacks:20"

[env]
  PORT = "8080"

[experimental]
  allowed_public_ports = []
  auto_rollback = true

[[services]]
  http_checks = []
  internal_port = 8080
  processes = ["app"]
  protocol = "tcp"
  script_checks = []
  [services.concurrency]
    hard_limit = 25
    soft_limit = 20
    type = "connections"

  [[services.ports]]
    force_https = true
    handlers = ["http"]
    port = 80

  [[services.ports]]
    handlers = ["tls", "http"]
    port = 443

  [[services.tcp_checks]]
    grace_period = "1s"
    interval = "15s"
    restart_limit = 0
    timeout = "2s"

What address is your Node app listening on? It needs to listen on Ipv6 interfaces to work. So perhaps try with ::. Feel free to paste your package.json or runner script.

Ah, silly me. Yes, it’s the default localhost. Does it need to be ipv6 or can I used the ipv4 0.0.0.0.