nextjournal

JaimeV 2022-02-09T00:28:53.068919Z

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?

JaimeV 2022-02-15T21:29:41.022059Z

@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?

mkvlr 2022-02-11T16:01:10.152609Z

Hi, can you change the port? We expose 9998 like for example here https://nextjournal.com/nextjournal/flask

JaimeV 2022-02-11T16:59:15.470559Z

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?

JaimeV 2022-02-24T13:54:57.359879Z

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

Andrea 2022-02-24T15:23:28.968439Z

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...

mkvlr 2022-02-21T15:52:21.257959Z

sorry I dropped this. I believe @andrea712 should have more samples for this?

Andrea 2022-02-21T16:05:38.118059Z

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?