Skip to content
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

jekyll is infinitely compiling when running on docker #51

Open
antoniom opened this issue Jul 20, 2018 · 3 comments
Open

jekyll is infinitely compiling when running on docker #51

antoniom opened this issue Jul 20, 2018 · 3 comments

Comments

@antoniom
Copy link

antoniom commented Jul 20, 2018

When running jekyll serve --watch from my machine, jekyll-asset-pipeline scans for any css_asset_tag which is then bundled/minified/processed accordingly to the specified configuration.

When running the same command over the jekyll docker container it enters an endless loop regenerating the same css/js files To reproduce the problem I have uploaded a default jekyll project, with jekyll-asset-pipeline as an extra dependency.

Steps to reproduce

You will see an endless loop of the following messages:

......
jekyll_1  |       Regenerating: 1 file(s) changed at 2018-07-20 15:25:29
jekyll_1  |                     .asset_pipeline/assets/global-126f86ef705d66b48241be588c246da1.css
jekyll_1  | Asset Pipeline: Processing 'css_asset_tag' manifest 'global'
jekyll_1  | Asset Pipeline: Saved 'global-126f86ef705d66b48241be588c246da1.css' to '/srv/jekyll/_site/assets'
jekyll_1  |                     ...done in 0.2914276 seconds.
jekyll_1  | 
jekyll_1  |       Regenerating: 1 file(s) changed at 2018-07-20 15:25:29
jekyll_1  |                     .asset_pipeline/assets/global-126f86ef705d66b48241be588c246da1.css
jekyll_1  | Asset Pipeline: Processing 'css_asset_tag' manifest 'global'
jekyll_1  | Asset Pipeline: Saved 'global-126f86ef705d66b48241be588c246da1.css' to '/srv/jekyll/_site/assets'
jekyll_1  |                     ...done in 0.2699366 seconds.
jekyll_1  | 
jekyll_1  |       Regenerating: 1 file(s) changed at 2018-07-20 15:25:30
jekyll_1  |                     .asset_pipeline/assets/global-126f86ef705d66b48241be588c246da1.css
jekyll_1  | Asset Pipeline: Processing 'css_asset_tag' manifest 'global'
jekyll_1  | Asset Pipeline: Saved 'global-126f86ef705d66b48241be588c246da1.css' to '/srv/jekyll/_site/assets'
jekyll_1  |                     ...done in 0.2881608 seconds.
jekyll_1  | 
jekyll_1  |       Regenerating: 1 file(s) changed at 2018-07-20 15:25:30
jekyll_1  |                     .asset_pipeline/assets/global-126f86ef705d66b48241be588c246da1.css
jekyll_1  | Asset Pipeline: Processing 'css_asset_tag' manifest 'global'
jekyll_1  | Asset Pipeline: Saved 'global-126f86ef705d66b48241be588c246da1.css' to '/srv/jekyll/_site/assets'
jekyll_1  |                     ...done in 0.2700728 seconds.
.....

Is there a bug, or misconfiguration which causes jekyll to regenerate again and again the same assets?

@jmsalazar84
Copy link

I think that the problem is related to the watch excluded folders because this plugins is constantly creating and deleting the same folder .asset_pipeline into the root directory.

I'm not an expert but I think that "create/delete" events are detected by the watch job and produce the loop in this case.

I solve this behavior doing this change in my _config.yml
asset_pipeline:
staging_path: '_assets/pipeline'

Greetings :)

@timstallmann
Copy link

Hmm -- I'm having this same issue but the fix doesn't seem to work here, instead I get:

Regenerating: 1 file(s) changed at 2020-03-15 16:13:06
                     _assets/.asset_pipeline/assets/global-1e0a56903cab4cb35e3fa85b5435530c.css

Any other ideas?

@Philzen
Copy link

Philzen commented Aug 19, 2023

@jmsalazar84 didn't fix it for me also, as it seems (at least for me) the watcher does not care at all that the staging_folder is created in an excluded folder, thus still ends up in a regeneration loop.

Setting staging_folder to a folder outside the project directory finally worked for me, for instance:

asset_pipeline:
  staging_path: '../.asset-pipeline'

or

asset_pipeline:
  staging_path: '/tmp/.asset-pipeline'

both work fine. The latter of course will only work on a *nix-like system.

You might want to override this in your CI pipeline _config.yml where you only want to build once anyway and different permissions may prevent the asset pipeline from being executed otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants