[django]

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = %4{Vs(Pc!GU-]@OaAl0)(*4/yERwU<ct`ncV{1)O%32$6q
# Space-separated list of hosts
ALLOWED_HOSTS = localhost
# Time-zone, possible values here: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
TIME_ZONE = Europe/Paris
# PostgreSQL access
DB_HOST = 127.0.0.1
DB_PORT = 5432
DB_NAME = gargandb
DB_USER = gargantua
DB_PASS = C8kdcUrAQy66U
# Logs
LOG_FILE = /var/log/gargantext/backend/django.log
LOG_LEVEL = DEBUG
LOG_FORMATTER = verbose
# Pidfile of django backend test server
TESTSERVER_PIDFILE = /tmp/gargantext_testserver.pid
# Celery
CELERYD_PID_FILE = /tmp/celery.pid
CELERYD_LOG_FILE = /var/log/gargantext/backend/celery.log
CELERYD_LOG_LEVEL = DEBUG

[uwsgi]

# See: http://uwsgi-docs.readthedocs.io/en/latest/ThingsToKnow.html
# And: http://uwsgi-docs.readthedocs.io/en/latest/articles/TheArtOfGracefulReloading.html

# Tip from: https://serverfault.com/questions/411361/uwsgi-ini-configuration-for-python-apps
if-env         = VIRTUAL_ENV
print          = [uWSGI] launched from virtualenv %(_)
virtualenv     = %(_)
endif          =

# needed to run uwsgi when it was not installed with pipenv
plugins        = python35
# needed to run uwsgi outside of pipenv shell, because of this virtualenv bug:
# https://github.com/kennethreitz/pipenv/issues/829
home           = /home/alexandre/.local/share/virtualenvs/gargantext-ykNZD4Cw
# unix socket is better than TCP one, there is less overhead
socket         = /tmp/gargantext.sock
chmod-socket   = 664
# user running uwsgi MUST be a member of www-data group
chown-socket   = %U:www-data
# wsgi django module
module         = gargantext.backend.wsgi:application
# about master: http://uwsgi-docs.readthedocs.io/en/latest/Management.html?highlight=master#reloading-the-server
master         = True
# can do: uwsgi --stop /tmp/gargantext.pid
pidfile        = /tmp/gargantext.pid
# clear environment on exit
vacuum         = True
max-requests   = 5000
# background the process & log
daemonize      = /var/log/gargantext/uwsgi/@(exec://date +%%Y-%%m-%%d).log
logfile-chmod  = 644
# one log file per day
log-reopen     = true

# touch /tmp/gargantext.reload to reload configuration (after git pull for instance)
touch-reload   = /tmp/gargantext.reload
