revite
revite copied to clipboard
feat: drastically shrink the docker image, also build for arm64
Right now the generated docker container contains a copy of the development environment used to compile the revite interface. This PR loses about 440MB compressed, or around 800MB uncompressed from the final image size. node in the final image has been bumped from 16 to 24, sirv-cli, and the dependencies for inject.js have been updated
The container still holds a copy of the source code, it's not too big. the node modules are the size concern.
cut from docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
ghcr.io/docteh/revolt-revite (this pr) master 2e6cd9d35eed 59 minutes ago 226MB
ghcr.io/revoltchat/client (current) master 9ded77d2d429 5 days ago 1.01GB
Regarding moving disabled-js.svg to public/disabled-js.svg, it fixes the broken image if anyone visits the web interface with javascript disabled. It also gets a lone image out of the root of the repository.
Start:
/usr/src/app # du -d 1
20 ./scripts
44024 ./node_modules
58800 ./dist
3492 ./src
1764 ./public
7588 ./.git
186392 ./.yarn
773244 ./external
1075776 .
Finish:
/usr/src/app # du -d 1
58980 ./dist_injected
16 ./docker
20 ./scripts
58948 ./dist
3488 ./src
1768 ./public
828 ./node_modules
124152 .
Please make sure to check the following tasks before opening and submitting a PR
- [x] I understand and have followed the contribution guide
- [x] I have tested my changes locally and they are working as intended
- [x] These changes do not have any notable side effects on other Revolt projects ~~* [ ] (optional) I have opened a pull request on the translation repository~~
- [x] I have included screenshots to demonstrate my changes