question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

node_modules in nginx images

See original GitHub issue

Just noticed node_modules take up 235M. Is there any reason it’s included in the final nginx images? Is it somehow required by frappe down the line; maybe during runtime?

https://github.com/frappe/frappe_docker/blob/b670b4a9d52a4d5ce6115e7928de25251f1a612c/build/frappe-nginx/Dockerfile#L44-L46

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
revantcommented, Jul 8, 2021

We’re living with 10+ year old software. Docker images didn’t exist then. Probably vm images was the thing.

ERPNext worker image is ~1.5gb with all the py and os deps. It backs up and restores 1k tables for ERPNext.

In here, size doesn’t matter!

0reactions
sunhowwcommented, Jul 7, 2021

Maybe all required static assets in node_modules could be copied to another folder (the existing lib folder?) and referenced from there in application code. Or maybe from a cdn. But then it’s up to the frappe team for such major changes.

For an instant, I thought about writing some patches and applying them during build. But, decided I shouldn’t mess around with application code that much. Maintainability and what not. I can live with a slightly bigger image and slower container start up.

Read more comments on GitHub >

github_iconTop Results From Across the Web

NGINX with Docker and Node.js — a Beginner's guide - Ashwin
Dockerizing a Node.js app with NGINX using Docker-Compose · What is a Dockerfile? A text document which tells Docker how to assemble an...
Read more >
NGINX 3rd Party Modules
Module Description Repository Accept Language Module Accept‑Language header parser giom/nginx_acc... AFCGI Asynchronous/multiplexing FastCGI for NGINX rsms/afcgi HTTP Digest Authentication HTTP Digest Authentication atomx/nginx‑htt...
Read more >
node.js - nginx and nodejs serve images from dynamic folder
But my questions is how can use serve image in expressjs. because image folder create dynamically by userId. app.use('/image', express.static(' ...
Read more >
Nginx and Node.js with Docker
I'll be using Docker to create a Nginx web server and a Nodejs server. ... For Nodejs, I'll be creating a custom Docker...
Read more >
nginx - Official Image - Docker Hub
Nginx (pronounced "engine-x") is an open source reverse proxy server for HTTP, HTTPS, SMTP, POP3, and IMAP protocols, as well as a load...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found