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

docker: improve image layout and backend-only/frontend-only images #2071

Merged
merged 7 commits into from
Jun 5, 2024

Conversation

nicoloboschi
Copy link
Collaborator

@nicoloboschi nicoloboschi commented Jun 5, 2024

Changes:

  • Improved official image
    • Added runtime layer to keep only the virtual environement without source code
    • Reproducible build by removing poetry lock in the docker image
    • Added opencontainers labels
    • Add test on CI to verify build is working with correct version of langflow
  • Added a new official image langflow-ai/langflow-backend meant to be ran as backend-only
    • Start from the official image
    • Remove the frontend directory (improve size and reduce vulnerability surface)
    • Run with backend-only by default
  • Added a new official image langflow-ai/langflow-frontend meant to be ran as frontend-only
    • Uses nginx debian official image
    • Build NPM and copy the build files into the nginx directory
    • Backend url must be provided at runtime via env or via first arg (env BACKEND_URL)
    • Nginx rule to bypass everything starting with /api to that backend url

Copy link

vercel bot commented Jun 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langflow ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 5, 2024 10:25am

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels Jun 5, 2024
@nicoloboschi nicoloboschi changed the title docker: improve image layout and backend-only image docker: improve image layout and backend-only/frontend-only images Jun 5, 2024
Copy link
Contributor

@ogabrielluiz ogabrielluiz left a comment

Choose a reason for hiding this comment

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

@nicoloboschi !

That is so good. Thank you so much.

LGTM

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jun 5, 2024
@ogabrielluiz ogabrielluiz merged commit ba59a9f into langflow-ai:dev Jun 5, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants