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

chore: accelerate docker compose by skipping frontend build #30021

Merged
merged 4 commits into from
Sep 4, 2024

Conversation

mistercrunch
Copy link
Member

@mistercrunch mistercrunch commented Aug 27, 2024

while waiting for a docker-compose build, I decided to go and skip the long steps around the frontend buildsthat are not required while in dev mode while using docker-compose where we mount the local repo and build it inside docker.

Note that it's always tricky to have conditional logic in docker files as things aren't procedural. I took the approach of using and ARG and having conditions in RUN commands which accomplishes the goal of skipping the frontend builds in DEV_MODE=true.

changes:
- skip npm ci when DEV_MODE=true
- skip npm run build when DEV_MODE=true
- introduce an ARG for INCLUDE_FIREFOX, skip by default
- introduce an ARG for INCLUDE_CHROMIUM, include in dev layer by default - added a note in UPDATING.md even though people shouldn't really use the dev target from our Dockerfile.

Copy link

request-info bot commented Aug 27, 2024

We would appreciate it if you could provide us with more info about this issue/pr! Please do not leave the title or description empty.

@request-info request-info bot added the need:more-info Requires more information from author label Aug 27, 2024
@mistercrunch mistercrunch force-pushed the accelerate_docker_compose branch from d7bf2df to 1fe4168 Compare August 27, 2024 17:14
@pull-request-size pull-request-size bot added size/M and removed size/S labels Aug 27, 2024
@mistercrunch mistercrunch marked this pull request as ready for review August 27, 2024 17:28
@dosubot dosubot bot added the infra:container Infra container and K8s label Aug 27, 2024
@rusackas
Copy link
Member

Can we add some docs to the installing section that explains how/why one would change modes, and what does/doesn't happen in each mode? This is a fantastic optimization, but might lead to Github Issues if it's non-obvious.

One of these days, I'm gonna try switching us to Yarn. It'd be faster, and likely more stable, but would undoubtedly cause a lot of outcry/confusion :P

while waiting for a `docker-compose build`, I decided to go and skip the long steps around the frontend buildsthat are not required while in dev mode while using  `docker-compose` where we mount the local repo and build it inside docker.

changes:
- skip `npm ci` when DEV_MODE=true
- skip `npm run build` when DEV_MODE=true
- introduce an ARG for INCLUDE_FIREFOX, skip by default
- introduce an ARG for INCLUDE_CHROMIUM, include in `dev` layer by default
@github-actions github-actions bot added the doc Namespace | Anything related to documentation label Sep 4, 2024
@mistercrunch mistercrunch force-pushed the accelerate_docker_compose branch from 0d716ef to a4f6a79 Compare September 4, 2024 01:50
@mistercrunch
Copy link
Member Author

@rusackas added some docs and rebased

@@ -112,7 +112,7 @@ Join our growing community!
- [Showmax](https://showmax.com) [@bobek]
- [TechAudit](https://www.techaudit.info) [@ETselikov]
- [Tenable](https://www.tenable.com) [@dflionis]
- [Tentacle](https://tentaclecmi.com) [@jdclarke5]
- [Tentacle](https://www.linkedin.com/company/tentacle-cmi/) [@jdclarke5]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just FYI, the link checker is non-blocking. I'm wondering if these guys went out of business or something. The site's been down for about a week thus far, and I didn't get a response from them on Slack.

Copy link
Member

@rusackas rusackas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it! Thanks for the docs!

@mistercrunch mistercrunch merged commit cc39afe into master Sep 4, 2024
35 checks passed
@mistercrunch mistercrunch deleted the accelerate_docker_compose branch September 4, 2024 15:52
nyohasstium pushed a commit to Webgains/superset that referenced this pull request Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Namespace | Anything related to documentation infra:container Infra container and K8s need:more-info Requires more information from author preset-io size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants