Add api workers config value

This commit is contained in:
Taras Terletskyi 2023-08-02 23:53:49 +03:00
parent d4297ec82a
commit 4777855e29
2 changed files with 3 additions and 3 deletions

View file

@ -1,11 +1,11 @@
import uvicorn
from api.core.app import app
from api.core.app import app # noqa: F401
from api.core.config import settings
if __name__ == '__main__':
uvicorn.run(
app,
'main:app',
host=settings.API_HOST,
port=settings.API_PORT,
workers=settings.API_WORKERS,

View file

@ -19,7 +19,7 @@ services:
restart: unless-stopped
ports:
- "1984:8000"
command: bash -c "python start.py && uvicorn main:app --host 0.0.0.0 --port 8000"
command: bash -c "python start.py && python main.py"
depends_on:
- postgres
- rabbitmq