Skip to content

(DOCKER) Deploy & Maintain IMPatienT

Corentin edited this page Dec 26, 2022 · 2 revisions

If you can't run the scripts, you might need to do a chmod +x docker/*.sh before !

0- Clone the repository

git clone https://github.com/lambda-science/IMPatienT.git impatient
cd impatient

1- Pull Latest Image or Build from Source

  • Pull Latest Image:
    docker pull corentinm7/impatient:latest
    OR
  • Build from Source:
    run build.sh with ./docker/build.sh

This takes ~ 3 minutes and results in a 2gb image.
Don't hesitate to modify the config/ content before building the image to modify the resulting app (gene list, diagnostic list...)

2- Create the docker volume (persistent data)

⚠️ 🚨 This is only needed for fresh/clean/new installations. This WILL delete all your previous IMPatienT database and ontology as this creates a new volume and overwrite its content with the content of the current directory data/. ⚠️ 🚨
For fresh install run create_volume.sh:
./docker/create_volume.sh
NB1: If you have issues with permissions on data folder inside the docker. You might have to chown -R 1000 data/ before ./docker/create_volume.sh
NB2: This can also be used to deploy/inject/restore backup data to the container: as this script copy current data/ folder content to the volume. Simply add your app.db backup in data/database/ and ontology.json backup in data/ontology and your patient folders with images in data/images/ before running the script.
For exemple: for demo deployment, you should run cp data/database/app.db.demo data/database/app.db and data/ontology/ontology.json.demo data/ontology/ontology.json

3- Running the container

To run the container you will need to modify the run_sample.sh with your own parameters (passwords, email address...).
To edit the full and then run the container, do the following:

cp docker/run_sample.sh docker/run.sh
nano docker/run.sh
./docker/run.sh

Congrats your IMPatienT container should be up and running now on the port your specified (default: 8000).

To expose your container to the web (using a domain name) please refer to the LINUX Deploy & Maintain Wiki page. This process can be done by installing and configuring Nginx and Certbot (HTTPS).