Skip to content

epigen-UCSD/epigen_ucsd_django

Repository files navigation

Nextseq app

Requirement

  • Python: v3.6.5
  • Django: 2.2.5

Install

Install conda envirionment

 conda create -n ${ENV_NAME}  --file requirement.txt -c defaults -c conda-forge 

Another option since we did no mantain the requirement.txt

 conda env create -f django.yml
 source activate django

Set up database

see here

# 1. init db
pg_ctl -D /Users/frank/pgsql/data -l logfile init

# 2. start db 
pg_ctl -D /Users/frank/pgsql/data -l logfile start

# 3. create db
createdb nextseqapp

# 4. enter db
psql -d nextseqapp

Change user to test

CREATE DATABASE nextseqapp OWNER test;
ALTER USER test WITH PASSWORD '123456';

Run

Create a deploy.ini file under folder epigen_ucsd_django/, check that file in deploy env to see what should be included. then run the following:

python manage.py makemigrations
python manage.py migrate
python manage.py runserver 
python manage.py createsuperuser

deploy

see here

python manage.py runserver 0.0.0.0:8000

testing account

username: test password: testdjango

links