-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Skip building frontend when APP_ENV=dev #4843
Conversation
Thank you for giving this another try! Can you elaborate a bit on what's build kit? |
BuildKit is a feature of Docker that makes building convenient and fast. I thought this way would be better than to separate Dockerfile #4292 in the view of maintainability. |
Signed-off-by: koooge <koooooge@gmail.com>
Signed-off-by: koooge <koooooge@gmail.com>
Signed-off-by: koooge <koooooge@gmail.com>
- run: | ||
name: Build Front End Assets for some testcases # TODO: Fix testcases and remove this step | ||
command: | | ||
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - | ||
sudo apt-get install -y nodejs | ||
npm ci | ||
npm run build | ||
docker cp ./client/dist $(docker-compose ps -q redash):/app/client/ |
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.
Some backend unit testcases depend on frontend.
COPY . /app | ||
COPY --from=frontend-builder /frontend/client/dist /app/client/dist | ||
|
||
FROM ${APP_ENV}-server |
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.
prod-server or dev-server
What do you think of #4879? I realized that we can do it with an ARG, which felt simpler as it's supported across more versions of Docker. The main issue with BUILDKIT is if it's not supported, Docker will build more images than before resulting in slower performance. Also it required more changes. But curious about what you think. Thanks. |
Superseded by #4879 |
What type of PR is this? (check all applicable)
Description
Skip building frontend materials when APP_ENV=dev with BuildKit
Requirements:
docker 18.09.3+
docker-compose 1.25.1+
Related Tickets & Documents
Yet another #4292
Mobile & Desktop Screenshots/Recordings (if there are UI changes)