53 строки
1.5 KiB
INI
53 строки
1.5 KiB
INI
# mysite_uwsgi.ini file
|
|
[uwsgi]
|
|
base = /code
|
|
chdir = %(base)
|
|
module = olympia.wsgi:application
|
|
|
|
# process-related settings
|
|
master = true
|
|
# maximum number of worker processes
|
|
processes = 4
|
|
vaccum = true
|
|
socket = :8001
|
|
uid = olympia
|
|
gid = olympia
|
|
memory-report = true
|
|
enable-threads = true
|
|
|
|
# Run watchmedo (via watchdog) to implement unrestricted
|
|
# autoreload capability.
|
|
fs-reload = %(base)/docker/artifacts/
|
|
|
|
# `CIRCLECI` is empty by default and only set to `true` by CircleCI.
|
|
# See addons-server issue #12064
|
|
# First copy the environment value
|
|
if-env = CIRCLECI
|
|
running-circleci = %(_)
|
|
endif =
|
|
|
|
# But default to it being set to `none`
|
|
if-not-env = CIRCLECI
|
|
running-circleci = none
|
|
endif =
|
|
|
|
# If the value is actually set to `true` (which it is in CircleCI)
|
|
# then don't run the autoreload
|
|
if-not-opt = running-circleci=true
|
|
safe-pidfile = %(base)/docker/artifacts/addons-server-uwsgi-master.pid
|
|
attach-daemon = setsid watchmedo shell-command --patterns="*.py" --recursive --command='/usr/bin/touch %(safe-pidfile)' %(base)
|
|
endif =
|
|
|
|
max-requests = 5000
|
|
|
|
# Load apps in workers and not only in master
|
|
lazy-apps = true
|
|
|
|
# Open log file after we dropped privileges so that the file is being owned
|
|
# by olympia:olympia and has proper permissions to be readable outside
|
|
# of docker
|
|
logto2 = %(base)/logs/uwsgi-master.log
|
|
|
|
# Set default settings as originally done by manage.py
|
|
env = DJANGO_SETTINGS_MODULE=settings
|