Skip to content

UTA rest install log

Dave Lawrence edited this page Feb 9, 2022 · 9 revisions
sudo bash
apt-get update
apt-get upgrade -y

apt-get install -y git-core python3-venv redis nginx

# Users and source code

SYSTEM_UTA_REST_USER=uta_rest
UTA_REST_INSTALL_DIR=/opt/uta_rest

id -u ${SYSTEM_UTA_REST_USER} &>/dev/null || useradd ${SYSTEM_UTA_REST_USER} --create-home --shell "/bin/bash"
mkdir -p ${UTA_REST_INSTALL_DIR}
chown ${SYSTEM_UTA_REST_USER} ${UTA_REST_INSTALL_DIR}
chgrp ${SYSTEM_UTA_REST_USER} ${UTA_REST_INSTALL_DIR}

su ${SYSTEM_UTA_REST_USER}
UTA_REST_INSTALL_DIR=/opt/uta_rest  # Again for user
cd ${UTA_REST_INSTALL_DIR}
if [ ! -e ${UTA_REST_INSTALL_DIR}/.git ]; then
    git clone https://github.com/sacgf/uta_rest.git .
fi

# Install Python libraries
mkdir venv
python3 -m venv venv/uta_rest
source /opt/uta_rest/venv/uta_rest/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install gunicorn # Install into venv so it gets libraries
python3 -m pip install -r requirements.txt
Clone this wiki locally