fix: correct local Docker deployment issues#1212
Conversation
- Fix invalid ENV syntax in Dockerfiles (LC_ALL=C.UTF-8=value -> LC_ALL=C.UTF-8) - Add --baseurl /wiki to jekyll serve commands so sidebar links resolve correctly - Fix site.github.build_revision reference to not break when running outside GitHub Pages - Update Gemfile sources from http to https
|
@Yehonal, I need you to look into this when you have a moment. I'm trying to resolve an issue that has always been present (or at least, it was for me when trying to deploy the project locally). Thanks. |
Yehonal
left a comment
There was a problem hiding this comment.
Thanks for working on this. The direction is good, but I do not think this is ready to merge yet because the local Docker setup still does not successfully run.
I tested this on a dev host with Docker 28.1.1 against the PR branch.
What works:
docker compose build github-wiki-themenow succeeds, so theLC_ALLand HTTPS Rubygems changes do help.
What still fails:
docker compose up -d github-wiki-themestarts the container, but Jekyll exits immediately because the image usesruby:latest, which currently resolves to Ruby 4.0.x. The current GitHub Pages/Jekyll stack is not compatible with that and fails with:
cannot load such file -- csv
- Plain
docker compose up -dstill fails because both services publish the same host ports:
Bind for 0.0.0.0:4000 failed: port is already allocated
The upstream Drassil compose files avoid this by putting the GitLab service behind a gitlab profile. AzerothCore's compose file does not currently do that.
- The
site.github.build_revisionguard is only applied in_includes/azerothcore/afterhead.html. There is still an unguarded use in_layouts/git-wiki-bs-github.html.
I also tested the likely fix path locally: pinning Ruby to an older compatible line and aligning _config.yml with the current Drassil git-wiki config (jekyll-remote-theme, jekyll-paginate, markdown: kramdown, kramdown.input: GFM) allows the Jekyll build to complete.
Suggested follow-up before merge:
- Pin the Docker base image instead of using
ruby:latest. - Add a profile or different ports for the GitLab service so default
docker compose upworks. - Align AzerothCore
_config.ymlwith the current Drassil git-wiki config for remote theme and markdown handling. - Guard the remaining
site.github.build_revisionusage in_layouts/git-wiki-bs-github.html.
- Pin Ruby base image to 3.3 to fix 'cannot load csv' error with ruby:latest (4.0.x) - Add Docker profiles to github/gitlab services to prevent port bind conflicts - Guard site.github.build_revision in git-wiki-bs-github.html layout
Thank you for the review and the details regarding all the remaining issues; it was truly helpful in understanding that it wasn't finished yet. Currently, with the help of AI, based on your specifications, I believe the issues you mentioned have been added. However, I'm relying on your analysis to confirm if there are any outstanding issues. Thank you for your time. |
|
I just realized it's a bit more complex than I thought, because it uses a template remotely, which doesn't exist within Docker and isn't downloaded automatically. We could make it download automatically, but then, here on the GitHub build page, it's likely that they'll want to keep it remote. Anyway, I can't get Docker running on my current machine because I can't access the BIOS, so this change doesn't really make much sense if you don't want to run it locally. For my part, I had been looking into an alternative for a while now. I'll leave you the link; it seemed good, and in fact, I can set up a local environment without problems to make changes and see them before uploading them, which is partly what I wanted to achieve with it, and be able to add Bootstrap or modifications to the theme, based on what they wanted to use... the alternative is: https://vitepress.dev/ and I also managed to build it on the GitHub page https://pangolp.github.io/wiki-ac/, I even moved many of the files. |
Description
Related Issue
Closes
Thank you for contributing to the AzerothCore wiki.
Remember that the wiki is currently available in English and Spanish.