/
Transplantfirst Server Config

Transplantfirst Server Config

These sites require python3.6 and git25 to access the repo server. Ensure these two software collection versions are enabled if not just using the configured virtual environment.

scl enable rh-python36 bash

scl enable sclo-git25 bash


MAGIC and transplantfirst websites are set up on the renalreg server. Due to historical reasons they are both run under the txfirst  user account on the renalreg server. Both sites follow a similar configuration pattern.

Their urls are:

https://magic.renalreg.org 

https://transplantfirst.renalreg.org

File locations are  under the home account of txfirst:

[root@www.renalreg.org ~]# su - txfirst
[txfirst@www.renalreg.org ~]$
[txfirst@www.renalreg.org ~]$ ls -l /home/txfirst/sites
total 8
drwxr-xr-x. 13 txfirst txfirst 4096 Nov 24 15:24 magic.renalreg.org
drwxr-xr-x. 12 txfirst txfirst 4096 Aug 20 14:24 transplantfirst.renalreg.org
[txfirst@www.renalreg.org ~]$

Django settings are managed differently between the two projects. magic just has a single settings.py file whilst transplantfirst follows the standard of a settings folder with a base.py imported into a local.py and production.py settings file to give the appropriate settings for each environment. In transplantfirst the manage.py file has been edited to default to using the production.py settings file thus avoiding the need for the environment variable DJANGO_MODULE_SETTINGS  to be set. If set it overrides the default.

When pulling down magic updates ensure the settings.py file is saved separately as it will be overwritten by the checkout process and lose the production settings.

The sites are proxied via the software collection apache 2.4 server in /opt/rh/httpd24   with config files in /opt/rh/httpd24/root/etc/httpd/conf.d  with magic configuration in 06-magic.conf  (and 04-transplantfirst.conf  for transplant first). Log files for the proxy server can be found in /var/log/httpd24    and for the sites the log files are currently in the project directory for each project. (These probably should be relocated to /var/log/txfirst and /var/log/magic)

The webservices run on port 9886 for magic and 9876 for transplant first. The server is started using the script (which also sets the log file location)  in the bin folder under each site and it is a standard service style init.d script taking the commands start, stop and restart see Nephwork Server Config - Systems Team - Confluence (renalregistry.nhs.uk) for more detail on the type of script used