******************************************************************************* Staging ******************************************************************************* In the staging, you will be able to try out the application with all the components of the application and the possibility of visualizing modifications of the code in live thanks to the volume sharing. Star instance =============================================================================== .. note:: For linux users, it is necessary to add `sudo` before all `docker` commands. Step 1 : Open a terminal ------------------------------------------------------------------------------- - `Windows `_ - `Mac OSX `_ - `Linux `_ Step 2 : Clone project ------------------------------------------------------------------------------- .. code-block:: bash git clone https://gitlab.com/ifb-elixirfr/covid19/EMERGEN-DB.git cd EMERGEN-DB Step 3: Run docker compose ------------------------------------------------------------------------------- .. warning:: Docker must always be switched on for any installation and use of EMERGEN-DB ! .. code-block:: bash # Login to GitLab registry with your GitLab ID docker login registry.gitlab.com # Download last app image docker-compose -f docker-compose.staging.yml pull web # Run images docker-compose -f docker-compose.staging.yml up -d # Migrate models into database docker-compose -f docker-compose.staging.yml exec web python manage.py migrate # Load data docker-compose -f docker-compose.staging.yml exec web python manage.py load_region docker-compose -f docker-compose.staging.yml exec web python manage.py load_departement docker-compose -f docker-compose.staging.yml exec web python manage.py load_description # Create materialized view docker-compose -f docker-compose.staging.yml exec web python manage.py generate_mat_view_dep_reg docker-compose -f docker-compose.staging.yml exec web python manage.py generate_mat_view_team_auth_group # Add external database intructions docker-compose -f docker-compose.staging.yml exec web python manage.py load_gisaid_instruction # Create super user docker-compose -f docker-compose.staging.yml exec web python manage.py createsuperuser # Get static file docker-compose -f docker-compose.staging.yml exec web python manage.py collectstatic --no-input --clear Step 4: Open your favorite web browser and play with EMERGEN-DB ------------------------------------------------------------------------------- EMERGEN-DB is running. You can open a web browser and use it in the following url : `http://localhost:443/ `_. Step 5 : Close EMERGEN-DB ------------------------------------------------------------------------------- .. code-block:: bash docker-compose -f docker-compose.staging.yml down Other commands ------------------------------------------------------------------------------- **Restart** .. code-block:: bash docker-compose -f docker-compose.staging.yml up -d **Get logs** .. code-block:: bash docker-compose -f docker-compose.staging.yml logs -f