ofSite icon indicating copy to clipboard operation
ofSite copied to clipboard

Make docker env for development, update dependencies [WIP]

Open smeyfroi opened this issue 3 years ago • 5 comments

The build instructions in current README fail due to dependency issues on up-to-date MacOS, Ubuntu and Alpine Linux.

This is a WIP attempt to provide an easy-to-install (and cross-platform) docker environment for development work.

To get the dependencies to work, I had to upgrade nikola (which dragged some plugins along with it).

I also had to tweak the call to markdown in the custom documentation plugin; markdown has changed one of its method signatures in the newer version I ended up at here. Which means this PR is not backwards-compat with legacy development environments.

Dependencies are unpinned at the moment, until it's proven to be working correctly.

At first glance it seems to work, but before taking it any further I want feedback in case this is a wrong direction.

smeyfroi avatar May 25 '22 16:05 smeyfroi

I'm trying this and my results:

  • ./build_docker.sh works and builds an image

  • ./nikola_auto_build.sh seems to works, last line is INFO: auto: Serving on http://127.0.0.1:8000/ ... however nothing is listening on :8000

  • ./nikola_serve.sh says INFO: serve: Serving on http://0.0.0.0:8000/ ... which does work, and serves the freshly re-built 0.11.2 ofSite (I modified a source .md and the change shows up).

so on the docker side it seems to work!

however, the "documentation" tab is empty (which is the area I'd like to look into)... and also, side-question but: something must be auto-integrating the doxygen from the source? I have a limited understanding of the components involved here so it's not evident where to start looking...!

image

artificiel avatar Mar 02 '24 05:03 artificiel

Oh that's quite promising @artificiel ! I did the smallest thing I could do, without understanding the nicola build system.

It might be interesting to have someone with a little more knowledge chime in at this point? The problem of the broken ofSite dev environment seems like it could possibly be fixed inside a stable docker container...

smeyfroi avatar Mar 02 '24 21:03 smeyfroi

Thanks @smeyfroi ! I'm happy to merge this but might be good to make sure the instructions for running it all are clear. And do @artificiel 's notes need to be added?

Thanks again!

ofTheo avatar Mar 06 '24 17:03 ofTheo

Fab, leave it with me a while (life drawing tonight, so maybe weekend)... will clean up and make sure @artificiel comments properly taken into account. I think he had some questions related to the doc build itself: are you able to help with that @ofTheo ?

smeyfroi avatar Mar 06 '24 18:03 smeyfroi

Done:

  • bin/build_docker.sh
  • bin/rm_docker.sh
  • (bin/sh_docker.sh for debug)
  • bin/nikola_build.sh (see below)
  • bin/nikola_serve.sh
  • bin/nikola_auto.sh (see below)

To do:

  • Build fails for documentation and learning, which are implemented as nikola plugins that are broken on this newer version of nikola. I need to dig in to fix this.
  • auto fails for a nikola bug apparently recently fixed https://github.com/getnikola/nikola/issues/3761. Need to update and try this again.

Questions:

  • I've moved the local dev stuff into docker with new scripts in bin, but I haven't looked at how the "official" build is scripted. I'm assuming this work on the local dev environment is entirely orthogonal to the website build.
  • I believe there is more "local dev" stuff that can be deleted now, but I'm unclear what the official build requires. It's all a bit mixed up in the repo (which is why I made a new bin for local dev scripts).

More to come on this PR.

smeyfroi avatar Mar 10 '24 12:03 smeyfroi