mirror of
https://github.com/FuzzyGrim/Yamtrack.git
synced 2026-03-03 02:27:01 +00:00
support custom number of gunicorn workers
This commit is contained in:
@@ -64,6 +64,7 @@ volumes:
|
||||
| HTTPS_COOKIES | Bool | Cookies over HTTPS | No | False | [SESSION_COOKIE_SECURE](https://docs.djangoproject.com/en/4.1/ref/settings/#std-setting-SESSION_COOKIE_SECURE) and [CSRF_COOKIE_SECURE](https://docs.djangoproject.com/en/4.1/ref/settings/#std-setting-CSRF_COOKIE_SECURE)|
|
||||
| REGISTRATION | Bool | User registration | No | True | |
|
||||
| ADMIN_ENABLED | Bool | Django admin page | No | False | |
|
||||
| WEB_CONCURRENCY| Int | Number of worker processes | No | 1 | [Recommend (2 x $num_cores) + 1](https://docs.gunicorn.org/en/latest/design.html#how-many-workers) |
|
||||
| DEBUG | Bool | Django debug mode | No | False | |
|
||||
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ services:
|
||||
environment:
|
||||
- TMDB_API=TMDB_API_KEY
|
||||
- MAL_API=MAL_API_KEY
|
||||
- WEB_CONCURRENCY=2
|
||||
volumes:
|
||||
- ./db:/yamtrack/db
|
||||
ports:
|
||||
|
||||
@@ -11,4 +11,4 @@ groupmod -o -g "$PGID" abc
|
||||
usermod -o -u "$PUID" abc
|
||||
chown -R abc:abc db
|
||||
|
||||
exec gosu abc:abc gunicorn --bind :8000 config.wsgi:application
|
||||
exec gosu abc:abc gunicorn --bind :8000 --timeout 120 --preload config.wsgi:application
|
||||
|
||||
Reference in New Issue
Block a user