-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Small improvements to development dockerfile #422
Conversation
_config.yml
Outdated
@@ -13,7 +13,7 @@ description: > # this means to ignore newlines until "url:" | |||
The Apache Accumulo™ sorted, distributed key/value store is a robust, scalable, | |||
high performance data storage and retrieval system. | |||
url: "https://accumulo.apache.org" # the base hostname & protocol for your site | |||
exclude: [vendor] | |||
exclude: [/vendor, /.idea, /.git, /.github, /_site, /.sass-cache, /.jekyll-cache/, /.jekyll-metadata, /*.iml, /.bundle/, Dockerfile] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On https://jekyllrb.com/docs/configuration/options/ , it says that specifying this overrides the default excludes in Jekyll 3, but gets added to the defaults in Jekyll 4. We require at least Jekyll 4.2, so this doesn't need to specify anything already included in the defaults (which are also listed on that page). In the docs for include
, it also says dotfiles are excluded by default, but I don't see that specified in the docs for exclude
, so it's probably out of date.
I would remove any entries here that are in the default list. Also, remove _site
, because that is the output directory, and changes there should be handled correctly by jekyll automatically (and detecting changes might actually be important for incremental builds). The jekyll metadata and bundle directories and Dockerfile shouldn't change much, so I think those can be excluded, too.
I don't think the IDE files need to be added, because those files are probably not changing much unless you're editing the files themselves (also, I don't think it's common to use an IDE for the website).
Honestly, I would probably just delete this line entirely, and leave it to the defaults. I don't think we're doing anything so special here as to need to override this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it also says dotfiles are excluded by default, but I don't see that specified in the docs for
exclude
, so it's probably out of date.
The main reason I started adding to this feild was because I saw things get re-rendered when my .idea
file changed.
Dockerfile
Outdated
@@ -31,4 +31,4 @@ ENV PORT=4000 | |||
EXPOSE $PORT | |||
|
|||
# Configure the default command to build from the mounted repository. | |||
CMD bundle exec jekyll serve --force-polling -H $HOST -P $PORT | |||
CMD bundle exec jekyll serve --incremental -H $HOST -P $PORT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incremental is still marked as experimental, and the docs say it may break the site in some cases. If it's substantially more efficient, then it's fine if you leave it, but if it's only marginally beneficial, I'd drop it.
The following changes were made:
--force-polling
was removed. It was causing one thread at a time on my machine to jump to 100% CPU usage. Removing it seems to have no negative affects.--incremental
was added as an optimization. It makes it so it only regenerates the files that have changed instead of the whole project.exclude
field in the _config.yml so that when those files change, the site is not regenerated. Lots of the dirs and files I borrowed from the .gitignore