build(docker): switch backend flask deployment to Gunicorn
This commit is contained in:
@@ -28,7 +28,7 @@ services:
|
|||||||
- .env
|
- .env
|
||||||
ports:
|
ports:
|
||||||
- "5000:5000"
|
- "5000:5000"
|
||||||
command: flask --app server.app run --host=0.0.0.0 --debug
|
command: gunicorn server.app:app --bind 0.0.0.0:5000 --workers 2 --threads 4
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
- redis
|
- redis
|
||||||
@@ -48,13 +48,13 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
- redis
|
- redis
|
||||||
# deploy:
|
deploy:
|
||||||
# resources:
|
resources:
|
||||||
# reservations:
|
reservations:
|
||||||
# devices:
|
devices:
|
||||||
# - driver: nvidia
|
- driver: nvidia
|
||||||
# count: 1
|
count: 1
|
||||||
# capabilities: [gpu]
|
capabilities: [gpu]
|
||||||
|
|
||||||
frontend:
|
frontend:
|
||||||
build:
|
build:
|
||||||
@@ -69,4 +69,4 @@ services:
|
|||||||
- backend
|
- backend
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
model_cache:
|
model_cache:
|
||||||
|
|||||||
@@ -16,3 +16,4 @@ Requests==2.32.5
|
|||||||
sentence_transformers==5.2.2
|
sentence_transformers==5.2.2
|
||||||
torch==2.10.0
|
torch==2.10.0
|
||||||
transformers==5.1.0
|
transformers==5.1.0
|
||||||
|
gunicorn==25.3.0
|
||||||
|
|||||||
Reference in New Issue
Block a user