Skip to content

Commit 0b39bd1

Browse files
committed
Enable ability to customize concurrency of gunicorn processes
1 parent eab3665 commit 0b39bd1

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

docker-compose.custom.yml

+3-15
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,7 @@ services:
2929
- PORT=8081
3030
- ENVIRONMENT=local
3131
# https://github.com/tiangolo/uvicorn-gunicorn-docker#web_concurrency
32-
- WEB_CONCURRENCY=10
33-
# https://github.com/tiangolo/uvicorn-gunicorn-docker#workers_per_core
34-
# - WORKERS_PER_CORE=1
35-
# https://github.com/tiangolo/uvicorn-gunicorn-docker#max_workers
36-
# - MAX_WORKERS=10
32+
- WEB_CONCURRENCY=${WEB_CONCURRENCY:-10}
3733
# Postgres connection
3834
- POSTGRES_USER=username
3935
- POSTGRES_PASS=password
@@ -74,11 +70,7 @@ services:
7470
- HOST=0.0.0.0
7571
- PORT=8082
7672
# https://github.com/tiangolo/uvicorn-gunicorn-docker#web_concurrency
77-
- WEB_CONCURRENCY=1
78-
# https://github.com/tiangolo/uvicorn-gunicorn-docker#workers_per_core
79-
- WORKERS_PER_CORE=1
80-
# https://github.com/tiangolo/uvicorn-gunicorn-docker#max_workers
81-
- MAX_WORKERS=10
73+
- WEB_CONCURRENCY=${WEB_CONCURRENCY:-10}
8274
# Postgres connection
8375
- POSTGRES_USER=username
8476
- POSTGRES_PASS=password
@@ -127,11 +119,7 @@ services:
127119
- HOST=0.0.0.0
128120
- PORT=8083
129121
# https://github.com/tiangolo/uvicorn-gunicorn-docker#web_concurrency
130-
- WEB_CONCURRENCY=10
131-
# https://github.com/tiangolo/uvicorn-gunicorn-docker#workers_per_core
132-
# - WORKERS_PER_CORE=1
133-
# https://github.com/tiangolo/uvicorn-gunicorn-docker#max_workers
134-
# - MAX_WORKERS=10
122+
- WEB_CONCURRENCY=${WEB_CONCURRENCY:-10}
135123
# Postgres connection
136124
- POSTGRES_USER=username
137125
- POSTGRES_PASS=password

0 commit comments

Comments
 (0)