Migrating from Heroku - translating yml file

Hi! I’m pretty new to all of this so forgive this basic question. I am running a panel app out of a Jupyter notebook and using Docker because of some issues with certain libraries. I had help deploying it on Heroku and now I need help figuring out where the text of my heroku.yml file should go in deploying it with Render – anyone able to help me out here?

build:
  docker:
    web: Dockerfile
run:
  web: /env/bin/panel serve --address="0.0.0.0" --port=$PORT app.ipynb --allow-websocket-origin=autohazard-explorer.herokuapp.com

TIA!

Hi there,

I think I’ve replied to a ticket you also opened, but I’ll add a similar response here for completeness:

The Dockerfile’s CMD would be run on boot, so that would need to be set to something like:

CMD /env/bin/panel serve --address=“0.0.0.0” --port=$PORT app.ipynb --allow-websocket-origin=$RENDER_EXTERNAL_HOSTNAME

Blueprints/render.yaml aren’t required for deploying. If you want to use a Blueprint, as long as the env is set to docker, it will default to look for your Dockerfile in the root of your project (can be overridden with dockerFilePath), and the CMD will be used to boot (as above, but can be overridden with dockerCommand).

Overriding CMD using the “Docker Command” will also override any ENTRYPOINT. We’ve also seen customers with long/multiple-option boot commands (like yours) have issues setting that as a plain “Docker Command”, a workaround for this can be to put your start command in a shell script (e.g. render-start.sh) and set that as your Docker Command.

Alan

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