Deploying a Panel(Holoviz) Python app

I have a panel app that I want to deploy on The Docker file is quite simple

FROM continuumio/miniconda3
RUN conda install -c conda-forge nodejs
COPY requirements.txt .
RUN pip install -r requirements.txt
CMD panel serve --show \\
         --address --port 8080 --allow-websocket-origin="*"

The generated .toml file suggests I need to run my server on port 8080, as above:

app = "something-or-other"
kill_signal = "SIGINT"
kill_timeout = 5
processes = []


  auto_rollback = true

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

    force_https = true
    handlers = ["http"]
    port = 80

    handlers = ["tls", "http"]
    port = 443

    grace_period = "1s"
    interval = "15s"
    restart_limit = 0
    timeout = "2s"

It all deploys fine, I can read the logs, and the URL pops up. However, when I access it with my browser all I get is “Connection reset”, and no record of anyone accessing the app in the logs. I think that whatever proxies the Docker image to port 443/80 is just not working.

Anyone got any ideas of what’s going on?

Have you tried using exec form for your CMD instead of shell form?

From the Docker reference:

* CMD ["executable","param1","param2"] (exec form, this is the preferred form)
* CMD ["param1","param2"] (as default parameters to ENTRYPOINT)
* CMD command param1 param2 (shell form)

Thanks for the hint. I tried your suggestion, but I get the same result as before. This is what the log says, and it looks like everything is working as it should within the container.

2023-02-28T11:47:57.795 runner[97905368] lhr [info] Starting instance

2023-02-28T11:47:57.878 runner[97905368] lhr [info] Configuring virtual machine

2023-02-28T11:47:57.885 runner[97905368] lhr [info] Pulling container image

2023-02-28T11:48:10.008 runner[97905368] lhr [info] Unpacking image

2023-02-28T11:48:25.149 runner[97905368] lhr [info] Preparing kernel init

2023-02-28T11:48:25.590 runner[97905368] lhr [info] Configuring firecracker

2023-02-28T11:48:26.192 runner[97905368] lhr [info] Starting virtual machine

2023-02-28T11:48:26.543 app[97905368] lhr [info] Starting init (commit: 08b4c2b)...

2023-02-28T11:48:26.586 app[97905368] lhr [info] Preparing to run: `panel serve --show --address --port 8080 --allow-websocket-origin=*` as root

2023-02-28T11:48:26.625 app[97905368] lhr [info] 2023/02/28 11:48:26 listening on [fdaa:1:6da9:a7b:be65:9790:5368:2]:22 (DNS: [fdaa::3]:53)

2023-02-28T11:48:29.440 app[97905368] lhr [info] 2023-02-28 11:48:29,438 Starting Bokeh server version 2.4.3 (running on Tornado 6.2)

2023-02-28T11:48:29.440 app[97905368] lhr [info] 2023-02-28 11:48:29,439 Host wildcard '*' will allow connections originating from multiple (or possibly all) hostnames or IPs. Use non-wildcard values to restrict access explicitly

2023-02-28T11:48:29.440 app[97905368] lhr [info] 2023-02-28 11:48:29,439 User authentication hooks NOT provided (default user enabled)

2023-02-28T11:48:29.444 app[97905368] lhr [info] 2023-02-28 11:48:29,443 Bokeh app running at:

2023-02-28T11:48:29.444 app[97905368] lhr [info] 2023-02-28 11:48:29,443 Starting Bokeh server with process id: 520