Web Server Setup with templates from Ansible - GenomicsDB/GenomicsSampleAPIs GitHub Wiki

When Ansible was used to setup the infrastructure (see Install Genomics DB Infrastructure using Ansible), templates are created under web/templates directory. setup_webserver.py helps setting up an instance of the web server quickly using these templates.

Usage and options

usage: setup_webserver.py [-h] -p PORT -s SOCKET_PATH -a ARRAY_NAME
                          [-d SERVICE_DIRECTORY] [-e SERVICE_EXTENSION]
                          [-n NGINX_CONF_DIRECTORY] [-x]
Argument Optional (Yes/No) Description
-p PORT, --port PORT No Port to run the web server at
-s SOCKET_PATH, --socket_path SOCKET_PATH No Path to where the uwsgi unix socket needs to be created
-a ARRAY_NAME, --array_name ARRAY_NAME No Name of the array
-d SERVICE_DIRECTORY, --service_directory SERVICE_DIRECTORY Yes (default: /etc/systemd/system) Path to where the system services need to be installed
-e SERVICE_EXTENSION, --service_extension SERVICE_EXTENSION Yes (default: service) File extension for system services
-n NGINX_CONF_DIRECTORY, --nginx_conf_directory NGINX_CONF_DIRECTORY Yes (default: /etc/nginx/conf.d/) Path to where the nginx conf need to be
-x, --skip_services Yes (default: installs services using systemctl) Set this if service restarts will be handled outside this script