Source code for the Django Web Server, data is not included. To build and run the web server, v2h_binary_list_with_ires_iseq_category_seq_20231012.txt
, v2h_binary_ppi_info_complete_20230814.txt
, and v2h_bincocomp_with_coverage.csv
are necessary in the folder static/downloads/interface/
. To show the structures, docked structures and single structures are necessary in the folders static/docked_models/
and static/single_models/
, respectively. To support download, docked_models.tar.gz
and single_models.tar.gz
are necessary in the folder static/downloads/
. The running server site is https://3d-viralhuman.yulab.org.
- With
docker-compose
ordocker compose
command- Setup
docker-compose.yml
andDockerfile
(also with.env
andrequirements.txt
, see these file under BASEDIR) - Build images. Go to BASEDIR, run
docker-compose build
(ordocker compose build
ifdocker-compose
does not exist)
- Run containers. After building the image, run
docker-compose up
(ordocker compose up
). Use-d
to run the container in the background
- Setup
- With
docker
and manually link the web server and database server (if bothdocker-compose
anddocker compose
do not work)- Build web image
docker build -t vh3d .
- Create an image and container for the database (if port 5432 is not available, change the first 5432 to another one and change .env accordingly)
docker run -d --name db -e POSTGRES_DB=postgres -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -e TZ=UTC -p 5432:5432 postgres
- Run web container with the link to database container (8888 is the host port, 8020 is the internal port)
docker run -t -d --name web --link [database_container_id]:db -v $BASEDIR:$BASEDIR -p 8888:8020 -e DJANGO_DB_HOST=db -e DJANGO_DB_PORT=5432 -e DJANGO_DB_NAME=postgres -e DJANGO_DB_USER=postgres -e DJANGO_DB_PASSWORD=postgres [web_image_id]
- Build web image
- Make migrations after running the containers
- Log in to the server bash shell:
- `docker exec -it [web_container_id] bash
- Make migrations:
python manage.py makemigrations
python manage.py migrate
- Log in to the server bash shell:
- Update database (inside the server bash)
python manage.py update_Protein
python manage.py update_SingleModel
python manage.py update_DockedModel
python manage.py update_Interface
python manage.py update_InterfaceSimilarity
- Locally (development):
- [server ip]:[host port] (for example, if I run the containers on the server with address
xxx.xxx.xxx
, then the address of the webserver isxxx.xxx.xxx:8888
)
- [server ip]:[host port] (for example, if I run the containers on the server with address
- Publicly (production):
- Make sure the webserver is running smoothly on your server
- Contact the server owner/technician to set up the proxy to the public domain
Please contact [email protected] if you have any questions.