Skip to content

Commit c16a316

Browse files
committed
feat: add API workers configuration to environment and startup script
- Introduced API_WORKERS variable in .env.template for configurable worker count. - Updated startup.sh to utilize the API_WORKERS variable when starting the application with uvicorn.
1 parent 41e3fe0 commit c16a316

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.env.template

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ KEYCLOAK_PORT=8080
44
CODER_PORT=7080
55
APP_PORT=8000
66

7+
# API Configuration
8+
API_WORKERS=4
9+
710
# Database Configuration
811
POSTGRES_USER=admin
912
POSTGRES_PASSWORD=admin123

scripts/startup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ window.RUNTIME_CONFIG = {
1010
EOL
1111

1212
# Start the application
13-
exec uvicorn main:app --host 0.0.0.0 --port 8000
13+
exec uvicorn main:app --host 0.0.0.0 --port 8000 --workers $API_WORKERS

0 commit comments

Comments
 (0)