Health check on port 8080 has failed. Health

I am getting this error on fly deployment.

Dockerfile:

FROM python:3.9-slim

WORKDIR /app

COPY . /app

RUN pip install --no-cache-dir -r requirements.txt

ENV PORT=8080

# Make port 8080 available to the world outside this container

EXPOSE 8080

# Run flask app

CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080"]

fly.staging.toml:


app = 'oddience-scripts'
primary_region = 'lhr'
kill_signal = "SIGINT"
kill_timeout = 60
processes = []

[deploy]
  strategy = "bluegreen"

[build]
  builder = 'paketobuildpacks/builder:base'
  buildpacks = ["gcr.io/paketo-buildpacks/python"]

[env]
  PORT = '8080'

[[services]]
  internal_port = 8080
  processes = ["app"]
  protocol = "tcp"
  script_checks = []
  auto_stop_machines = true
  auto_start_machines = true
  min_machines_running = 1
  
  [[services.http_checks]]
    path = "/"
    interval = "10s"
    timeout = "2s"

  [services.concurrency]
    hard_limit = 5000
    soft_limit = 2500
    type = "requests"

  [[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"

Error:

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