yark icon indicating copy to clipboard operation
yark copied to clipboard

Docker support

Open na4ma4 opened this issue 2 years ago • 7 comments

I've got a PR ready to add docker support.

Is it OK to add github actions for building the image, I'll also need to add a command line option to allow changing the bind address for view so it can be bound to 0.0.0.0 for the container.

If's that's all good I'll go ahead and put in the PR.

na4ma4 avatar Jan 12 '23 02:01 na4ma4

Yep, github actions are totally fine to use, I was going to use it for linting/formatting soon. Can you add a --port= option with that new --host= option for the viewer so it configuring it is a bit more feature complete? Once that's good i'll review and merge

Owez avatar Jan 12 '23 14:01 Owez

What about using argparser for the flags and arguments ?

na4ma4 avatar Jan 12 '23 23:01 na4ma4

What about using argparser for the flags and arguments ?

The homegrown one has a bit of life left in it, if it ain't broke don't fix it (for now). Eventually it should be replaced with something nice like click or the other popular one

Owez avatar Jan 13 '23 00:01 Owez

I've had a quick go but there's some bugs in the archiver-debt branch that I'll wait to get settled.

But basically the changes I was looking to make:

  • add bind_host, bind_port and open_in_webbrowser properties to Config.
  • add settings_flask method to Config.
  • add argument parsing to view command.
  • add a Dockerfile.

na4ma4 avatar Jan 19 '23 06:01 na4ma4

And so I don't lose it, the help text for view.

yark view [name] [args?]

  Launches offline archive viewer website, optionally opening a webbrowser
  to view a specific archive.

Arguments:
  --disable-webbrowser  Disabled the automatic opening of a web browser
  --host=[host/ip]      Bind to specific IP or hostname
  --port=[port number]  Bind to a different port number than the default 7667

 Example:
  $ yark view
  $ yark view demo
  $ yark view demo --disable-webbrowser --host=0.0.0.0 --port=8080

na4ma4 avatar Jan 19 '23 06:01 na4ma4

Them changes look good, if you take the branch as it is now at 0ee9be04bdda1e9afcebbfee3a2e0e90f748d962 it should be stable enough to add. Made a design descision yesterday to opt for Python 3.11-only (#93) so you might have to update the image to it

Owez avatar Jan 19 '23 21:01 Owez

I'll leave this open even though #106 has been merged because the restructure with the new GUI has made it so docker is needed for yark-api specifically and not the current all-in-one dockerfile on the master branch at the moment

Owez avatar Feb 15 '23 21:02 Owez