The Search Tag & Analyze Resource for collaborative annotation and interpretation of disease from open digital samples from GEO.
Create an Ubuntu 16.04 instance.
Configure ssh connection by adding something like this to ~/.ssh/config
:
Host stargeo
HostName 123.45.67.89
User ubuntu
IdentityFile /path/to/stargeo.pem
IdentitiesOnly yes
Clone code locally:
git clone git@github.com:idrdex/star-django.git stargeo
cd stargeo
Switch to branch:
git checkout limited
Install deployment dependencies (unless you've already installed dev ones):
We will use virtualenv and virtualenvwrapper to create isolated python environment, so start with:
sudo pip install virtualenv virtualenvwrapper
When create a virtualenv for our project and install dependencies:
mkvirtualenv star
pip install -r requirements-deploy.txt
Install and configure:
fab install
fab config # Fill in all the keys here
fab restart
Config command will open ~/app/.env
remote file in vim,
alternatively you can ssh into instance and edit it directly.
You will need to specify BIOPORTAL_API_KEY
(get here), FROM_EMAIL
and ADMIN
.
Create a superuser for yourself (need one to log into admin):
fab manage:createsuperuser
Here are steps to make local deployment of this app in order to tinker it.
Get sources:
git clone git@github.com:idrdex/star-django.git
cd star-django
Install development dependencies (like above, different file):
pip install -r requirements-dev.txt
Update settings:
All settings that should vary by deployment go to .env
file, so:
cp .env.example .env
<edit> .env
Adjust settings in .env
file, you will probably need to only set DATABASE_URL
for your working copy.
Create or migrate database tables:
./manage.py migrate
./manage.py createsuperuser
Run it and have fun:
./manage.py runserver 5000
Go to http://localhost:5000/
to see the app
or to http://localhost:5000/admin/
to see admin panel.
To debug background tasks you'll need to start celery:
honcho start celery
NOTE: it doesn't autorestart, you'll need to do that manually.
To run both development web-server and celery in single terminal and autorestart both do:
# .. install node.js and npm somehow
npm install -g nodemon
nodemon -x 'honcho start' -e py
Configure ssh connection (see in install).
Install deployment dependencies (see in install).
Run locally to deploy latest commit:
fab deploy