Hi, I would like to use a block/cell as the render target for docker environment serving content on localhost:8080. Is there a way to do this? Are iframes supported in next journal?
@mkvlr Hi Martin, I checked the flask example. It seems pretty straight forward. That said, I would like to have an iframe for rendering the content served by the docker image. I don't see a place to configure the port or the path presented to docker. Am I missing something?
Hi, can you change the port? We expose 9998 like for example here https://nextjournal.com/nextjournal/flask
I believe so. Below is the command that I use to run it locally.
docker run -it --rm -p 8080:8080 -v $PATH:/usr/local/app containerid
Is there a way to configure the port and $PATH through the environment settings?Hi @andrea712, I'm trying to use the structurizr-lite container inside an iframe in nextjournal. The instructions provided ask for configuration of the port and mount path. See details at https://dev.to/simonbrown/getting-started-with-structurizr-lite-27d0
By inspecting the image you pasted here, you can see the command which runs in the container: catalina.sh run. So we might use that manually in a notebook. Gave this a try in a public notebook https://nextjournal.com/zampino/structurizr that you can remix. maybe you don’t need to configure the port but use a service runtime (basically a long running process that can be reached by other runtimes). Try remixing the notebook to play around, the missing part would be to “proxy” catalina server onto a public facing URL (like in the flask app example) from within a — say — python runtime. But it all seems pretty hacky, sorry...
sorry I dropped this. I believe @andrea712 should have more samples for this?
Hi @jev, at the moment it’s not possible to configure the port we expose in the runtime (read: the docker container), and at present we only allow some kind of “mounts”. Another (less minimal) example is how to configure a Dash application to have its iframe render correctly: https://nextjournal.com/nextjournal/dash likewise you could try to configure your application to use the 9998 port. Can you share a notebook that we can have a look at to help further?