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

Changes to static-bundles.json not recognized when running locally via Docker #5840

Closed
jpetto opened this issue Jun 22, 2018 · 3 comments
Closed
Assignees

Comments

@jpetto
Copy link
Contributor

jpetto commented Jun 22, 2018

The new CSS/JS bundles created for /whatsnew/ for Fx61 are 404'ing when running locally via Docker, but work fine when running via npm start.

STR: Running locally via Docker, create a new JS bundle (containing any .js file) and include it on any page. You'll see a 404 in the terminal window when loading that page. Running the site via npm start loads the new bundle correctly.

After a quick look, my guess is that this is due to static-bundles.json being a part of the Docker image itself, and not being watched for changes. Having to re-build the Docker image each time a bundle is added is (IMO) too clunky.

@pmac
Copy link
Member

pmac commented Jun 25, 2018

Agreed. I believe I simply overlooked that this file is in the root of the project, and to save on some performance and because I don't want to include node_modules in the volume I don't include the whole project directory as a volume in the running local container. You can see the defined volumes in the docker-compose.yml file:

volumes:
- ./media/:/app/media:delegated
- ./bedrock/:/app/bedrock:delegated

So I believe we'd just need to move that file to a subfolder and include said folder in that configuration, or include it in the bedrock folder. It could go in bedrock/settings where the last definition was, but that doesn't make that much sense considering what is using it. Something to think about since the only real user of that file is gulpfile.js.

@pmac
Copy link
Member

pmac commented Jun 25, 2018

Maybe just putting it in ./media/ makes the most sense?

@jpetto
Copy link
Contributor Author

jpetto commented Jun 25, 2018

👍 on putting it in ./media/.

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

2 participants