Closed dellagustin closed 4 years ago
Thanks a lot for contributing this work, @dellagustin! 🙏
I think I might not be able to review it within the next 24h - but anyway: I am really looking forward to playing around with your implementation and will happily provide review feedback asap :)
Hi @maxcapraro Did you have the chance to review this PR? If you need any help with the setup, please let me know.
Thanks for your patience with this one :) I'll look into it today
Hi @maxcapraro , thanks for the review 👍 I answered your comments, there are some decisions to be made (solve now or accept and track technical debt). Can you take a look? The docu I can write and push a new commit.
Thanks for the clarifications, @dellagustin! So far: looks good to me (except for the one comment re: documentation). Let's add that and then (if Jo and Cedrid haven't raised an opinion re: the two alternative docker files by then) let's merge :)
Hi @maxcapraro , I added documentation.
I created a new section for testing the page edits locally.
I think the build part is a bit confusing (i.e. general flow vs steps for ubuntu, no mention of the htmlproofer step), and as it is, I am not sure it adds much value, if the contributor is already using jekyll serve
, but I did not want to change this for now.
It's beautiful. Thank you @dellagustin!
This commit enables the usage of Docker for setting up a development environment.
It is an implementation for
91
With this development, with the command
docker-compose up
ordocker-compose -f docker-compose-toolbox.yml up
(for Docker Toolbox), a docker image is built and a docker contain is run serving the webpage, that can be accessed onhttp://localhost:4000
(orhttp://<docker machine ip>:4000
for Docker Toolbox)Files:
.dockerignore
- ensures that only the necessary files are used in the context passed to the docker image build, saving build timeDockerfile
- The commands used to build a docker imagedocker-compose.yml
- Configuration for docker-compose, that enables a simple development environment setup, automating the image build and container orchestrationdocker-compose-toolbox.yml
- docker-compose file with tweaks for Docker Toolbox (see comments on files)_docker_dev_toolbox.yml
- overrides url configuration for Docker Toolbox (see comments on file)Known limitations:
jekyll serve
, but testing showed it did not work)~--force_polling
docker-machine ip
. More investigation is necessary.~Explanations:
RUN apk add --no-cache g++ gcc make musl-dev
- necessary for building gem native extensions (eventmachine) - Error message "You have to install development tools first."RUN bundle update --bundler
- Image build on Docker Toolbox worked without this, but when trying to build the image on Docker for Mac, it raised the following error:find_spec_for_exe': Could not find 'bundler' (1.16.1) required by your /InnerSource/Gemfile.lock. (Gem::GemNotFoundException) To update to the latest version installed on your system, run `bundle update --bundler`.
--host 0.0.0.0
- without this line, jekyll will only accept traffice incoming fromlocalhost
or127.0.0.1
, which is not the case when using Docker for Mac or Docker Toolbox, as it forwards traffic from the host to the container. Without this line, the browser will show errors ERR_CONNECTION_REFUSED (Toolbox) or ERR_EMPTY_RESPONSE (Mac).Remarks:
Letf overs and follow ups:
RUN bundle update --bundler
only on Docker Desktop, but not on toolboxjekyll/jekyll
imageReferences:
PS: I carried https://github.com/InnerSourceCommons/innersourcecommons.org/commit/f4edc9fd7c92006eaeba8c3cafe9758f8f58e4fe to this PR by mistake, but I imagine #98 will be approved before this one, so I will not undo that.