kopia lustrzana https://github.com/jointakahe/takahe
remove custom env var and update docs
rodzic
665c96a857
commit
ac313929ac
2
Procfile
2
Procfile
|
@ -1,3 +1,3 @@
|
|||
web: gunicorn takahe.wsgi:application --workers ${TAKAHE_WORKERS:-8}
|
||||
web: gunicorn takahe.wsgi:application --workers 8
|
||||
worker: python manage.py runstator
|
||||
release: python manage.py migrate
|
||||
|
|
|
@ -50,6 +50,7 @@ RUN TAKAHE_DATABASE_SERVER="postgres://x@example.com/x" TAKAHE_SECRET_KEY="takah
|
|||
|
||||
EXPOSE 8000
|
||||
|
||||
ENV GUNICORN_CMD_ARGS=""
|
||||
# Set some sensible defaults
|
||||
ENV GUNICORN_CMD_ARGS="--workers 8"
|
||||
|
||||
CMD ["bash", "docker/run.sh"]
|
||||
|
|
|
@ -12,7 +12,7 @@ sed "s/__CACHESIZE__/${CACHE_SIZE}/g" /etc/nginx/conf.d/default.conf.tpl | sed "
|
|||
# Run nginx and gunicorn
|
||||
nginx &
|
||||
|
||||
gunicorn takahe.wsgi:application -b 0.0.0.0:8001 --workers ${TAKAHE_WORKERS:-8} $GUNICORN_EXTRA_CMD_ARGS &
|
||||
gunicorn takahe.wsgi:application -b 0.0.0.0:8001 $GUNICORN_EXTRA_CMD_ARGS &
|
||||
|
||||
# Wait for any process to exit
|
||||
wait -n
|
||||
|
|
|
@ -32,8 +32,9 @@ using more resources if you give them to it), you can:
|
|||
* Takahe is run with Gunicorn which spawns several
|
||||
[workers](https://docs.gunicorn.org/en/stable/settings.html#workers) to
|
||||
handle requests. Depending on what environment you are running Takahe on,
|
||||
you might want to customize the worker count via the `TAHAKE_WORKERS`
|
||||
environment variable. The default is `8`.
|
||||
you might want to customize this via the ``GUNICORN_CMD_ARGS`` environment
|
||||
variable. For example - ``GUNICORN_CMD_ARGS="--workers 2"`` to set the
|
||||
worker count to 2.
|
||||
|
||||
|
||||
As you scale up the number of containers, keep the PostgreSQL connection limit
|
||||
|
|
Ładowanie…
Reference in New Issue