This repository is deployed at orfeus-eu.org/rrsm.
-
Create the .env configuration file from
/src/rrsm/.env.sample
and adjust its values.cp src/rrsm/.env.sample src/rrsm/.env
- SECRET*KEY should be a 50-characters long string of random characters from the following set:
abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&\*(-*=+)
- Only
SECRET_KEY
,DEBUG
andALLOWED_HOSTS
settigns are meaningful. Rest of them can be left unchanged, they are here just to satisfy the Django Framework CACHE_BACKEND
can be set to:django.core.cache.backends.memcached.MemcachedCache
with location127.0.0.1:11211
(default for python-memcached)django.core.cache.backends.filebased.FileBasedCache
with location e.g./data/rrsm_cache/
django.core.cache.backends.db.DatabaseCache
with location e.g.rrsm_cache_table
django.core.cache.backends.dummy.DummyCache
can be used during development
CACHE_TIME_SHORT
,CACHE_TIME_MEDIUM
andCACHE_TIME_LONG
are timers (in seconds) used for cache validation assigned to pages depending on how often their content changesRRSM_URL_BASE
allows adding a URL prefix to all RRSM URLs
- SECRET*KEY should be a 50-characters long string of random characters from the following set:
-
Create the virtual environment:
python3 -m venv env
-
Activate the virtual environment:
source env/bin/activate
-
Let's upgrade pip and install the dependencies:
pip install --upgrade pip pip install -r src/rrsm/requirements.txt
-
Run the test server:
python3 src/rrsm/manage.py runserver 0.0.0.0:8000
-
Make sure ports are set up correctly
/src/docker-compose.yml
/src/nginx/sites-enabled/django
-
Build and run the images:
cd src/ docker-compose -p 'rrsm' up -d
-
Connecting to a running container can be done using:
docker exec -it <CONTAINER ID> sh
Tests can be executed using following command:
python3 src/rrsm/manage.py test rrsmi
Tail can be used to follow the app logs:
tail -f src/rrsm/logs/rrsm.log
-
The WebService response times in some cases can get long resulting in
504 Gateway Timeout
. This can be prevented by modifying the/etc/ninx/nginx.conf
on the Nginx container and adding following lines to the basic config:proxy_read_timeout 300;