I’m trying to deploy a deno app using the grammy library; it’s a chatbot library that talks to Telegram. Telegram can communicate back to your bot using HTTPS webhooks so I thought fly.io might be a perfect deployment platform.
I have had zero luck deploying my deno app, however.
flyctl was unable to detect my deno app (is it because the code was in the
src/ directory instead of at the root of the repo?).
flyctl launch ended up making me a slightly generic
fly.toml, which I thought would work:
# fly.toml file generated for yorick on 2022-05-16T10:09:00-05:00 app = "yorick" kill_signal = "SIGINT" kill_timeout = 5 [env] YORICK_PROD = "true" [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]] handlers = ["tls", "http"] port = 443 [[services.tcp_checks]] grace_period = "1s" interval = "15s" restart_limit = 0 timeout = "2s"
Dockerfile is below:
FROM denoland/deno:1.21.3 EXPOSE 8080 WORKDIR /app USER deno COPY ./src . RUN deno cache server.ts CMD ["run","--allow-net", "--allow-env", "server.ts"]
That server is listening on port 8080 and on the hostname “0.0.0.0”.
What I see in the console is this:
==> Monitoring deployment 1 desired, 1 placed, 0 healthy, 1 unhealthy --> v6 failed - Failed due to unhealthy allocations - no stable job version to auto revert to and deploying as v7
It’s never deployed successfully, so there’s nothing to roll back to. There’s nothing in the logs. The Monitoring tab in the dashboard shows
1 desired, 1 placed, 0 healthy, 1 unhealthy and a big section that says “Waiting for logs…” with nothing after it.
When I build and run that Docker image locally, the container starts successfully and takes requests. I’m kind of at a loss here. Any debugging tips?