Configuration
You can configure eventyay using config files or environment variables. You can combine those two options, and their precedence is in this order:
Environment variables
Configuration files
The config file in the environment variable
EVENTYAY_CONFIG_FILEif present, orThe following three configuration files in this order:
The config file
eventyay.cfgin thesrcdirectory, next to theeventyay.example.cfgfile.The config file
~/.Eventyay.cfgin the home of the executing user.The config file
/etc/eventyay/eventyay.cfg
Sensible defaults
This page explains the options grouped by configuration file sections. You’ll find the environment variable next to their corresponding settings. A config file looks like this:
[eventyay]
instance_name=eventyay
#url=https://app.eventyay.com/tickets
url=https://next.eventyay.com
currency=USD
; DO NOT change the following value, it has to be set to the location of the
; directory *inside* the docker container
trust_x_forwarded_for=on
trust_x_forwarded_proto=on
registration=on
talk_hostname=https://next.eventyay.com
video_server_hostname=https://next.eventyay.com:8443
[urls]
static=/static/
media=/media/
[locale]
default=en
# The following doesn't really work:
#timezone=America/Denver
# because (??) the machines run on UTC time and with this setting
# celery communication has a time difference, giving:
# eventyay-tickets | [2024-06-08 22:21:15,313: WARNING/MainProcess] Substantial drift from celery@5f47a4113906 may mean clocks are out of sync. Current drift is 21600 seconds. [orig: 2024-06-08 22:21:15.313012 recv: 2024-06-09 04:21:15.310646]
# which is 6h difference which seems to be the diff between Denver and UTC
timezone=UTC
[mail]
from = info@eventyay.com
host = mail.your-server.de
port = 587
user = info@eventyay.com
password = CHANGEME
tls = True
ssl = False
# redis stream:
[redis]
location=redis://eventyay-next-redis/0
; Remove the following line if you are unsure about your redis' security
; to reduce impact if redis gets compromised.
sessions=true
[celery]
backend=redis://eventyay-next-redis/1
broker=redis://eventyay-next-redis/2
[django]
secret=CHANGEME
The configuration format is the INI file format as understood by Python.
It’s worth mentioning that you can use any of yes/no, on/off,
true/false and 1/0 to set boolean settings. You can add add
comments by starting a line with ; or #. Also strings don’t need to be
quoted as every value is already a string.
The filesystem section
data
The
dataoption describes the path that is the base for all other directories. eventyay will also save its log files there. Unless you have a compelling reason to keep other files apart, setting thedataoption is the easiest way to configure file storage.Environment variable:
EVENTYAY_DATA_DIRDefault: A directory called
datanext to eventyay’smanage.py.
media
The
mediaoption sets the media directory that contains user generated files. It needs to be writable by the eventyay process.Environment variable:
EVENTYAY_FILESYSTEM_MEDIADefault: A directory called
mediain thedatadirectory (see above).
logs
The
logsoption sets the log directory that contains logged data. It needs to be writable by the eventyay process.Environment variable:
EVENTYAY_FILESYSTEM_LOGSDefault: A directory called
logsin thedatadirectory (see above).
static
The
staticsoption sets the directory that contains static files. It needs to be writable by the eventyay process. eventyay will put files there during therebuildandcollectstaticcommands.Environment variable:
EVENTYAY_FILESYSTEM_STATICDefault: A directory called
static.distnext to eventyay’smanage.py.
The site section
debug
Decides if eventyay runs in debug mode. Please use this mode for development and debugging, not for live usage. eventyay behaves differently when
debugis on, so you should run all your production commands, like e.g.rebuildwithdebugturned off.Environment variable:
EVENTYAY_DEBUGDefault:
Trueif you’re executingrunserver,Falseotherwise. Never run a production server in debug mode.
url
eventyay uses this value when it has to render full URLs, for example in emails or feeds. It is also used to determined the allowed incoming hosts.
Environment variable:
EVENTYAY_SITE_URLDefault:
http://localhost
secret
Every Django application has a secret that Django uses for cryptographic signing. You do not need to set this variable – eventyay will generate a secret key and save it in a local file if you do not set it.
Default: None
media
The URL under which the media files (all files uploaded by users or generated by eventyay) should be. If you change this value, remember to change your web server configuration, too!
Environment variable:
EVENTYAY_SITE_MEDIADefault:
/media/
static
The URL under which the static files should be. This includes all JavaScript and CSS files that are packaged with eventyay. If you change this value, remember to change your web server configuration, too!
Environment variable:
EVENTYAY_SITE_STATICDefault:
/static/
csp, csp_script, csp_style, csp_img, csp_form
Use any of these settings to update the matching CSP security headers. Your configuration values will be added to the default headers, they won’t replace them completely! If you need to include special values like
self, remember to use single tick quotation marks:csp=https://example.com,'self'Environment variables:
EVENTYAY_SITE_CSP,EVENTYAY_SITE_CSP_SCRIPTetc.Default:
''
The database section
backend
eventyay supports most SQL databases. You’ll need to install the appropriate Python library for each of them, as described in the table below.
Environment variable:
EVENTYAY_DB_TYPEDefault:
sqlite3
Database |
Configuration string |
pip package |
|---|---|---|
PostgresQL |
|
|
SQLite |
|
|
name
The database’s name.
Environment variable:
EVENTYAY_DB_NAMEDefault:
''
user
The database user, if applicable.
Environment variable:
EVENTYAY_DB_USERDefault:
''
password
The database password, if applicable.
Environment variable:
EVENTYAY_DB_PASSDefault:
''
host
The database host, or the socket location, as needed. For local PostgreSQL authentication, you can leave this variable empty.
Environment variable:
EVENTYAY_DB_HOSTDefault:
''
port
The database port, if applicable.
Environment variable:
EVENTYAY_DB_PORTDefault:
''
The mail section
This section serves to configure the email server eventyay will use to send emails by default. Events can override these settings in the web interface. However, even with event-specific settings, eventyay will use these global settings for non-event-specific emails like password resets (even when triggered from an event context) and team invitations.
from
The fall-back sender address, e.g. for when eventyay sends event independent emails.
Environment variable:
EVENTYAY_MAIL_FROMDefault:
admin@localhost
host
The email server host address.
Environment variable:
EVENTYAY_MAIL_HOSTDefault:
localhost
port
The email server port.
Environment variable:
EVENTYAY_MAIL_PORTDefault:
25
user
The user account for mail server authentication, if needed.
Environment variable:
EVENTYAY_MAIL_USERDefault:
''
password
The password for mail server authentication, if needed.
Environment variable:
EVENTYAY_MAIL_PASSWORDDefault:
''
tls
Should eventyay use TLS when sending mail? Please choose either TLS or SSL.
Environment variable:
EVENTYAY_MAIL_TLSDefault:
False
ssl
Should eventyay use SSL when sending mail? Please choose either TLS or SSL.
Environment variable:
EVENTYAY_MAIL_SSLDefault:
False
The celery section
Celery is not a requirement for eventyay. Celery runs as a separate process, and allows you to execute long-running tasks away from the usual request-response cycle.
Warning
If this config section is present, eventyay will assume that Celery workers exist and collect talks. If you include this section without providing Celery workers, no asynchronous tasks (like email sending) will be processed. If you do not use Celery, omit this section in your configuration.
backend
The celery backend. If you use a standard redis-based setup,
redis://127.0.0.1/1would be a sensible value.Environment variable:
EVENTYAY_CELERY_BACKENDDefault:
''
broker
The celery broker. If you use a standard redis-based setup,
redis://127.0.0.1/2would be a sensible value.Environment variable:
EVENTYAY_CELERY_BROKERDefault:
''
The redis section
If you configure a redis server, eventyay can use it for locking, caching and
session storage to speed up operations. You will need to install django_redis.
location
The location of redis, if you want to use it as a cache.
redis://[:password]@127.0.0.1:6379/1would be a sensible value, orunix://[:password]@/path/to/socket.sock?db=0if you prefer to use sockets.Environment variable:
EVENTYAY_REDISDefault:
''
session
If you want to use redis as your session storage, set this to
True.Environment variable:
EVENTYAY_REDIS_SESSIONSDefault:
False
The logging section
email
The email address (or addresses, comma separated) to send system logs to.
Environment variable:
EVENTYAY_LOGGING_EMAILDefault:
''
email_level
The log level to start sending emails at. Any of
[DEBUG, INFO, WARNING, ERROR, CRITICAL].Environment variable:
EVENTYAY_LOGGING_EMAIL_LEVELDefault:
ERROR
The locale section
language_code
The system’s default locale.
Environment variable:
PRETALX_LANGUAGE_CODEDefault:
en
time_zone
The system’s default time zone as a
pytzname.Environment variable:
PRETALX_TIME_ZONEDefault:
UTC
The files section
upload_limit
The maximum file size for uploads in MB.
Environment variable:
PRETALX_FILE_UPLOAD_LIMITDefault:
10