Add LAMB_WORKERS configuration support for Docker next deployment#362
Open
xezpeleta wants to merge 2 commits into
Open
Add LAMB_WORKERS configuration support for Docker next deployment#362xezpeleta wants to merge 2 commits into
xezpeleta wants to merge 2 commits into
Conversation
c0c3cdf to
bdffb5c
Compare
…b-Project#361 - Enhanced docker-entrypoint.py to automatically inject --workers flag when LAMB_WORKERS env var is set - Added LAMB_WORKERS environment variable pass-through in docker-compose.next.yaml - Documented workers configuration in .env.next.example with usage recommendations - Supports multiple workers for production deployments (recommended 2-4) - Smart detection prevents duplicate --workers flags and validates positive integers - Defaults to single worker when not set (suitable for development)
bdffb5c to
353eb90
Compare
Collaborator
Please, next time use |
Collaborator
Author
|
You're right, I've changed to dev. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #361
Overview
This PR adds support for configuring Uvicorn worker processes via the
LAMB_WORKERSenvironment variable in the Docker next deployment.Changes Made
1.
backend/docker-entrypoint.pyLAMB_WORKERSenvironment variable--workers Nflag into uvicorn command--workersflags2.
docker-compose.next.yamlLAMB_WORKERSenvironment variable pass-through to lamb service3.
.env.next.exampleLAMB_WORKERSdocumentation in OPTIONAL VARIABLES sectionUsage
Option 1 - Via .env file:
# Add to your .env file LAMB_WORKERS=4 docker compose -f docker-compose.next.yaml upOption 2 - Command line:
Option 3 - Override in compose file:
Behavior
4) → Multiple workers (production mode)--workersalready in commandTesting
All test cases passed:
Recommendations