-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
Conversation
We would appreciate it if you could provide us with more info about this issue/pr! Please do not leave the |
d7bf2df
to
1fe4168
Compare
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
0d716ef
to
a4f6a79
Compare
@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] |
There was a problem hiding this comment.
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.
There was a problem hiding this 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!
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 usingdocker-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 inRUN
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 inUPDATING.md
even though people shouldn't really use thedev
target from our Dockerfile.