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

image size optimization #529

Merged
merged 1 commit into from
Feb 10, 2021
Merged

Conversation

G1K
Copy link

@G1K G1K commented Feb 3, 2021

The size of the images will be reduced by about 2/3 of the size of ~ 400 MB.

Other possible improvements:

@Koenkk
Copy link
Collaborator

Koenkk commented Feb 3, 2021

@ciotlosm could you review this?

@Anonym-tsk
Copy link

Tested. Good job 👍

@Koenkk Koenkk merged commit d46f749 into danielwelch:master Feb 10, 2021
Koenkk added a commit that referenced this pull request Feb 10, 2021
@Koenkk
Copy link
Collaborator

Koenkk commented Feb 11, 2021

@ciotlosm the build stopped working after this PR. Already tried reverting it but that didn't help. Do you know what is going on?

image

@ciotlosm
Copy link
Collaborator

Hey. I have been away for a while. I will review all items later today and get back to you

@ciotlosm
Copy link
Collaborator

@Koenkk the upload problem seems to be related to credentials. Maybe something wrong with @danielwelch docker hub credentials. The image was built just the upload fails.

@ciotlosm
Copy link
Collaborator

@G1K I think would be great if we could adopt some of your optimisations in https://github.com/zigbee2mqtt/hassio-zigbee2mqtt that will become the official add-on. I will try to create a PR, but please help review as well.
That also removes the use for pm2 as it uses different method to keep the service running.

@G1K
Copy link
Author

G1K commented Feb 11, 2021

It's a pity that there are problems with the publication of images.

yes I will adapt, but a little later.
As an optimization option, I still use (run without npm), it saves time on not very powerful xiaomi gw, in openwrt, running npm even to show the version spends a lot of time.

Removing unused files (for example, via modclean) the size of all files together with node_modules is about 20 mb, the archive is 3-6 mb
image
https://openlumi.github.io/openwrt-packages/packages/19.07/arm_cortex-a9_neon/

or combining all the code (for example, via https://github.com/vercel/ncc) into one file allows you to fit the project in 8 megabytes together with the frontend
image

But for devices with docker and HomeAssistnt. I think it will be redundant

@ciotlosm
Copy link
Collaborator

@G1K I've included your changes here: zigbee2mqtt/hassio-zigbee2mqtt@0b07170

That's the reason we're trying to move to the "org" version of the add-on to allow more admins, in case someone is unavailable for a while.

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

Successfully merging this pull request may close these issues.

4 participants