Setup Workspace - datavisyn/snp_app GitHub Wiki
Setup SNP Workspace
-
Install prerequisites:
-
Install docker and docker compose
-
Install PyCharm
-
Install latest node (>= v6)
-
Install Yeoman and Phovea generator
sudo npm install -g yo github:phovea/generator-phovea
- Create a new snp workspace
mkdir snp_workspace
cd snp_workspace
- Clone new repositories
git clone https://github.com/datavisyn/snp_app.git -b master
- Create workspace and install npm dependencies
yo phovea:workspace
npm install
- Download database
- Open a web browser and download: https://drive.google.com/open?id=0B7lah7E3BqlATUlVVXZEdjE4NFE (wget doesn't work)
- Copy data into
snp_workspace/snp_app/data
mkdir snp_app/data
- Build docker containers (may take while) and run it
docker-compose up -d
- Develop client with two options:
- (preferred) use a dev server for code reloading, access via http://locahost:8080/ <-- different port
npm run start:snp_app
- watch files and use the python server, access via http://locahost:9000/
npm run watch:snp_app
- Start PyCharm and open the new
snp_workspace
workspace directory. Everything is set up for you. - Happy coding :)
Debug Python Code
see http://phovea.caleydo.org/contributors/pycharm_debugging/
Update Workspace
cd snp_workspace
cd snp_app
git pull
cd ..
npm update
Useful Docker Commands
docker-compose up ... starts the system
docker-compose restart ... restart
docker-compose stop ... stop
docker-compose logs ... show recent server logs
docker-compose ps ... show currently running machines