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