Skip to content

Commit baff904

Browse files
fix: update API command to use Gunicorn with Uvicorn worker for improved performance
1 parent 7c4def9 commit baff904

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docker/docker-compose.prod.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ services:
2828
image: ghcr.io/mathisverstrepen/meridian/backend:${IMAGE_TAG:-latest}
2929

3030
container_name: ${NAME}_api
31-
command: sh -c "chown -R appuser:appuser /app/data && su appuser -c 'alembic upgrade head && uvicorn main:app --host 0.0.0.0 --port ${API_PORT}'"
31+
command: sh -c "chown -R appuser:appuser /app/data && su appuser -c 'alembic upgrade head && gunicorn -w 4 -k uvicorn.workers.UvicornWorker main:app --bind 0.0.0.0:${API_PORT}'"
3232
ports:
3333
- "${API_PORT}:${API_PORT}"
3434
depends_on:

docker/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ services:
3232
context: ..
3333
dockerfile: docker/api.Dockerfile
3434
container_name: ${NAME}_api
35-
command: sh -c "chown -R appuser:appuser /app/data && su appuser -c 'alembic upgrade head && uvicorn main:app --host 0.0.0.0 --port ${API_PORT}'"
35+
command: sh -c "chown -R appuser:appuser /app/data && su appuser -c 'alembic upgrade head && gunicorn -w 4 -k uvicorn.workers.UvicornWorker main:app --bind 0.0.0.0:${API_PORT}'"
3636
ports:
3737
- "${API_PORT}:${API_PORT}"
3838
depends_on:

0 commit comments

Comments
 (0)