-
Install Docker to your laptop
-
Prepare the data and create a Data folder under the root project directory.
-
Prepare the example data and create a example_data folder under the Backend directory.
-
Create a .env file under the root project directory
DB_USERNAME=admin DB_HOST=db DB_NAME=chromosome_db DB_PASSWORD=chromosome DB_PORT=5432 PGADMIN_DEFAULT_EMAIL=admin@uic.edu PGADMIN_DEFAULT_PASSWORD=chromosome REDIS_HOST=redis REDIS_PORT=6379 REDIS_DB=0 REDIS_BROKER_DB=1 REDIS_TASK_DB=2
-
For development, under this project folder, and run
docker compose up -d --build
- Switch to publish branch
git switch publish - Build
docker compose -f docker-compose.prod.yml up -d --build
ChromPolymerDB/
├── .env
├── .gitignore
├── docker-compose.yml
├── LICENSE
├── README.md
├── Backend/
│ ├── app.py
│ ├── cell_line_labels.py
│ ├── chromosome_sizes.txt
│ ├── Dockerfile
│ ├── init_db.py
│ ├── insert_new_data.py
│ ├── process.py
│ ├── requirements.txt
│ ├── sBIF.sh
│ ├── Bintu/
│ ├── Example_data/
│ ├── Folding_input/
│ ├── GSE/
│ ├── New_cell_line/
├── Cron/
│ ├── crontab
│ └── Dockerfile
├── Data/
│ ├── chromosome_sizes.txt
│ ├── gene_list.csv
│ ├── human_gene_locations_with_names.csv
│ ├── Bintu/
│ ├── epigenetic_tracks/
│ ├── GSE/
│ ├── refined_processed_HiC/
│ └── valid_regions/
├── DB/
│ ├── Dockerfile
│ └── init-cron.sh
├── Frontend/
│ ├── .gitignore
│ ├── Dockerfile
│ ├── package-lock.json
│ ├── package.json
│ ├── build/
│ ├── node_modules/
│ ├── public/
│ └── src/
└── Scripts/
├── bintu_process.ipynb
├── hic_process.ipynb
├── preprocess.ipynb
├── test_corr.ipynb
└── verification.ipynb
# All services
docker compose logs -f
# Specific service
docker compose logs -f backendIf you want to restart a service that has already been deployed on the server, you need to add -f docker-compose.prod.yml, for example:
# Restart all service on the server
docker compose -f docker-compose.prod.yml restartOtherwise, using:
# Restart all
docker compose restart
# Restart specific service
docker compose restart backend# Check database connection
docker compose exec db psql -U $DB_USERNAME -d $DB_NAMEdocker exec -it Redis redis-cli FLUSHALLdocker builder prune --alldocker exec -it <container ID> bashTake GM12878-chr8-127300000-128300000 as an example
psql -U admin -d chromosome_db \
--command "\copy (SELECT * FROM public.distance WHERE cell_line = 'GM12878' AND chrid = 'chr8' AND start_value = 127300000 AND end_value = 128300000) TO '/opt/GM12878_chr8_127300000_128300000_original_distance.csv' WITH (FORMAT csv, HEADER, DELIMITER ',', QUOTE '\"', ESCAPE '''');"If your Docker is running on the server, you need to download this file from the container to your server
# Exit DB Container
exit
# Run
docker cp <container>:/path/in/container /path/on/host