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

feat: frontend docker nginx configuration add brower cache accelerated pages access #7125

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

jeevic
Copy link
Contributor

@jeevic jeevic commented Mar 18, 2025

nginx add configuration browser caching improves front-end page response speed

expires 1d;
add_header Cache-Control "public";

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. enhancement New feature or request labels Mar 18, 2025
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Mar 18, 2025
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Mar 18, 2025
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Mar 18, 2025
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Mar 18, 2025
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Mar 18, 2025
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Mar 21, 2025
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Mar 22, 2025
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Mar 23, 2025
@github-actions github-actions bot removed the enhancement New feature or request label Mar 25, 2025
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Mar 27, 2025
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Mar 28, 2025
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Mar 31, 2025
@ogabrielluiz
Copy link
Contributor

hey @jeevic

Thank you for this!

How's your experience with the nginx setup with Langflow? Have you managed to get a working deployment with frontend under nginx and the backend as a separate container/service?

@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Apr 2, 2025
@jeevic
Copy link
Contributor Author

jeevic commented Apr 2, 2025

hey   嘿@jeevic

Thank you for this!  谢谢你!

How's your experience with the nginx setup with Langflow? Have you managed to get a working deployment with frontend under nginx and the backend as a separate container/service?您对 Langflow 的 nginx 设置有何经验?您是否已成功实现前端在 nginx 下、后端作为单独容器/服务的有效部署?

yes, we deploy langflow separate deployment of front-end and back-end。in our practice,during the access, the front-end page will block the python web server。
we found a js file is size 13MB , very very slow 😄

We chose Langflow for its visual orchestration capabilities.
but Langflow needs to make efforts in performance optimization. Otherwise, it not for production use.

@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Apr 3, 2025
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Apr 6, 2025
@@ -13,6 +13,8 @@ server {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html =404;
expires 1d;
add_header Cache-Control "public";
Copy link
Collaborator

Choose a reason for hiding this comment

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

I did some reading and am interested in your thoughts @jeevic - for react, it's recommended to not cache index.html, since a new deploy may change where the new bundle is, and a cached index will point to a non-existent path.

chatgpt recommended:

   location ~* /index\.html$ {
        expires -1;
        add_header Cache-Control "no-store, must-revalidate";
    }

@Cristhianzl that make sense to you?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i accept your opinion

Copy link
Member

Choose a reason for hiding this comment

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

@jordanrfrazier you are correct.
we shouldn't be caching index.html, the index.html file serves as the entry point and typically includes references to versioned assets.

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Apr 8, 2025
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Apr 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants