epcstages/INSTALL.txt

75 lines
1.9 KiB
Text

====================
Installing epcstages
====================
Requirements
============
* Python >= 3.10
* A database with UTF-8 encoding (PostgreSQL or MySQL-InnoDB) and its
approriate Python driver (psycopg or mysqlclient)
* Git
Downloading code
================
The code for epcstages is available from this page:
https://git.2xlibre.net/claudep/epcstages
Python dependencies
===================
Python dependencies are listed in the requirements.txt file.
$ pip install -r requirements.txt
App Configuration
=================
The configuration settings should be written in the file common/local_settings.py
ADMINS = (
('Claude Paroz', 'claude@2xlibre.net'),
)
DEBUG = False
# This is only an example, choose another random string:
SECRET_KEY = 'zk!^92901p458c8lo0(fox-&k7jj(aple76_k%eva7b1)xjo8-'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
# or 'ENGINE': 'django.db.backends.mysql',
'NAME' : 'epcstages',
'USER' : 'db_user',
'PASSWORD': '<super_password>',
# Mysql only:
'OPTIONS': {
'init_command': 'SET storage_engine=INNODB',
}
}
}
The epcstages application does currently not send mail directly. However, server
errors are sent by email to ADMINS by default. If 'localhost' is not configured
to send mail, here are the settings needed to configure a SMTP relay:
EMAIL_HOST = 'my.smtp.relay'
EMAIL_HOST_USER = '...'
EMAIL_HOST_PASSWORD = '...'
When the above settings are defined, it's time to initialize the database:
$ python manage.py migrate
And to prepare static files:
$ python manage.py collectstatic
Web Deployment
==============
The deployment strategy is left to the system administrator. However, the
recommended way to deploy a Django application is with Apache and mod_wsgi.
https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/modwsgi/
Static files should be directly served through the /static directory.