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

yarn install in Docker takes too long #684

Open
SuaYoo opened this issue Mar 8, 2023 · 2 comments
Open

yarn install in Docker takes too long #684

SuaYoo opened this issue Mar 8, 2023 · 2 comments
Assignees
Labels
investigation Research and/or prototyping before dev work ops/deployment Related to deployment of Browsertrix Cloud

Comments

@SuaYoo
Copy link
Member

SuaYoo commented Mar 8, 2023

We can likely improve yarn caching so that it doesn't install if the lockfile doesn't change.

@SuaYoo SuaYoo added ops/deployment Related to deployment of Browsertrix Cloud investigation Research and/or prototyping before dev work labels Mar 8, 2023
@SuaYoo SuaYoo self-assigned this Mar 8, 2023
@SuaYoo SuaYoo moved this from Triage to Todo in Webrecorder Projects Mar 8, 2023
@Chickensoupwithrice
Copy link
Contributor

I ran into this yesterday. Building the Docker image for the frontend takes 5+ minutes if building from scratch. Builds after that were cached for me, taking 5s to complete.
Could probably move yarn install into it's own layer in the Dockerfile to get better caching?

@SuaYoo
Copy link
Member Author

SuaYoo commented Aug 7, 2023

The caching seems to be working well. yarn install is currently in its own layer with yarn cache clean to leverage Docker caching rather than the yarn cache: https://github.com/webrecorder/browsertrix-cloud/blob/main/frontend/Dockerfile#L10 I believe that the initial install takes a while because of the playwright + chromium install for e2e tests. We could use docker compose and install those packages separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigation Research and/or prototyping before dev work ops/deployment Related to deployment of Browsertrix Cloud
Projects
Status: Todo
Development

No branches or pull requests

2 participants