Skip to content
This repository has been archived by the owner on May 28, 2024. It is now read-only.

Commit

Permalink
added back workers
Browse files Browse the repository at this point in the history
  • Loading branch information
leftmove committed Mar 14, 2024
1 parent fbaccb6 commit 5cdaa76
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt

EXPOSE 8000

CMD ["python", "main.py"]
CMD ["python", "main.py", "development"]
2 changes: 2 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
ENVIRONMENT = os.environ.get("ENVIRONMENT", "development")
HOST = os.environ.get("HOST", "0.0.0.0")
EXPOSE_PORT = int(os.environ.get("EXPOSE_PORT", 8000))
WORKERS = int(os.environ.get("WORKERS", "9"))
FORWARDED_ALLOW_IPS = os.environ.get("FORWARDED_ALLOW_IPS", "*")
production_environment = True if ENVIRONMENT == "production" else False

Expand Down Expand Up @@ -50,6 +51,7 @@
port=EXPOSE_PORT,
log_config=log_config,
forwarded_allow_ips=FORWARDED_ALLOW_IPS,
workers=WORKERS,
)
else:
uvicorn.run(
Expand Down

0 comments on commit 5cdaa76

Please sign in to comment.