iric-data
IRIC Data Portal development effort
New DEV installation
# Clone repo and install pypi packages
cd <somewhere>
git clone git@gitlab.iric.ca:bioinfo_iric/iric-data.git
cd iric_aa
# Create a virtenv, py3
module add python/3.6.7
python -m venv .venv
# Activate venv
source .venv/bin/activate
pip install --upgrade pip # update pip version to latest
popd
pip install -r requirements.txt
# Install node modules
module add node
npm install
# run default gulp job to generate CSS/JS resources
gulp
# update .env to local settings
cp .env.example .env
# Make edits to .env file
Run project locally
# If you need to drop the DB tables
# login postgreSQL server and connect to db
DROP OWNED BY iric_data_user;
# Project requires the hstore extension be activated
## Need to be admin on postgresql
CREATE EXTENSION IF NOT EXISTS hstore;
# with active virtenv
# Initial deploy:
python manage.py migrate
python manage.py populate_iric
# run migrations if not initial deploy, safe to run if no migrations exist
python manage.py migrate portal
# Run without SSL
python manage.py runserver
# Site is now accessible at:
# http://127.0.0.1:8000
Deploy
git pull origin master
gulp prod
source .venv/bin/activate
python manage.py collectstatic
python manage.py migrate portal
touch iric_data/wsgi.py
Initial Deploy
# as adsoft, setup environment
sudo yum remove mod_wsgi
sudo yum install python34-devel
sudo pip3 install mod_wsgi
sudo mod_wsgi-express install-module
sudoedit /etc/httpd/conf.d/aa.conf
cd /var/www/private
git clone git@gitlab.iric.ca:bioinfo_iric/iric-data.git
cd
python3 -m venv .venv_local
source /var/www/private/iric-data/.venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
module add node
npm install
gulp prod
cp .env.example .env
# edit .env file
python manage.py migrate
sudo systemctl restart httpd
Translations
Make sure your virtual environment is active
django-admin makemessages -l fr
emacs gas/locale/fr/LC_MESSAGES/django.po # (or install gettext extension of choice)
django-admin compilemessages