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

npm install taking too long #63

Open
kaihendry opened this issue Feb 11, 2019 · 6 comments
Open

npm install taking too long #63

kaihendry opened this issue Feb 11, 2019 · 6 comments

Comments

@kaihendry
Copy link

Not sure if this is related to #26

Nonetheless we have an issue where the npm i is just taking too long and exhausting the health check in a ECS deployment phase.

Are we missing a trick? https://github.com/unee-t/frontend/blob/master/AWS-docker-compose.yml

Thank you,

@Ulexus
Copy link
Member

Ulexus commented Feb 11, 2019

It does take a while, but that looks pretty absurd. It's possible that one of your NPM dependencies is requiring a compilation that is just too intense for whatever instance size you are using.

Can you run the container locally without issue?

@kaihendry
Copy link
Author

Isn't it possible to sort of build it (with its dependencies) before it gets deployed?

With ECS it's pretty crucial the Docker image comes online quickly. Sorry, I am not really familiar with the way Meteor works though.

@Ulexus
Copy link
Member

Ulexus commented Feb 12, 2019

It is, yes, so long as your build and deploy architectures are the same. The README has a section on this. All of my deployments use this methodology, since the npm install really does take a while, particularly on complicated sites.

@kaihendry
Copy link
Author

I noticed that even when using the Dockerfile method https://media.dev.unee-t.com/2019-02-22/buildspec.yml

It STILL wants to build fibers on start. 🤕

@Ulexus
Copy link
Member

Ulexus commented Feb 22, 2019

That's got to be a mismatch between build and deploy architectures or OS's. That's always (that I have seen) what spawns a rebuild like that.

I've been talking about making a multi-stage build version of this for a long time. I guess I need to just step up and do that. That will make CI pipelines much simpler, if nothing else, making it easier for people who use different architectures between dev and deploy.

@kaihendry
Copy link
Author

This is my current workaround btw https://github.com/unee-t/frontend/blob/hmlet/buildspec.yml

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