-
Notifications
You must be signed in to change notification settings - Fork 15
Installation
Note: if you use docker, see these instructions: https://gist.github.com/gertvv/8319889, helpfully provided by Gert van Valkenhoef. Otherwise, continue on.
Please ensure that you have the following programs installed
- Git (link)
- virtualenv (optional, but highly recommended) (link)
- virtualenvwrapper (optional, but highly recommended) (link)
I will be covering installation that has been tested in a Linux environment. Windows installations will be similar but will require some modifications to the commands. The order of operations should be identical for the most part.
Create a virtualenv with python2
mkvirtualenv --python=python2 abstrackr-web
Create a root folder for the app. I will refer to this folder as 'project root' from now on
git clone https://github.com/bwallace/abstrackr-web.git
cd abstrackr-web
python setup.py install
Eutils, Pygooglechart, Biopython and numpy cannot be build with easy_install and thus are not included as prerequisites in the egg. The next steps describe how to install these manually.
With the new environment activated, run the following commands from within the 'project root' folder
git clone https://github.com/hpiwowar/eutils
cd eutils
python setup.py build
python setup.py install
cd ..
Install PyGoogleChart
pip install pygooglechart
Install Numpy
pip install numpy
Install Biopython
pip install "biopython==1.57"
Install Abstrackr
(== this is no longer required since we cloned the repo with git clone https://github.com/bwallace/abstrackr-web.git
==)
easy_install abstrackr
or
easy_install .
(== end ==)
Make a copy of the sample.ini (call it development.ini for example) and place it inside the 'project root' folder. Then on the line with 'sqlalchemy.url' modify the parts pertaining to your database name, username and password:
.
.
[app:main]
.
.
# SQLAlchemy database URL
sqlalchemy.url = mysql://<username>:<password>@127.0.0.1:3306/<database>
Next look for "# Mailing configurations" within the [app:main] section of the development.ini file and modify the following lines accordingly
.
.
[app:main]
.
.
# Mailing configurations
smtp_host = localhost
smtp_port = 25
sender = [email protected]
Prepare the database
CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON <database>.* TO 'username'@'localhost';
CREATE SCHEMA <database>;
Remove the following comment in the .ini file when you are ready for production
set debug = false
The next command will build your database tables, provided the database has been setup correctly and the user has the proper rights
Run the following command from the 'project root' directory
paster setup-app development.ini
Start the server
paster serve developement.ini