|
1 |
| -# The Graph Network Shiny App |
2 |
| - |
3 |
| -This application provides an interactive analytical COVID-19 dashboard for the African continent. |
4 |
| - |
5 |
| -## Deploying the App |
6 |
| -The application can be run locally or from Docker containers. |
7 |
| -before Building the container make sure an `.env_db` file exists with the proper variables declared. |
8 |
| - |
9 |
| -to start the containers, you need to have docker and docker-compose installed. Make sure you have the |
10 |
| -following directories in the root of your clone of this repository: `cleanCSV`(containins linelist CSVs) |
11 |
| -`maps` (containing the mapps in Geopackage format to be loaded), and `dicts` (containing the name dictionaries |
12 |
| -as JSON files). Then run the following command: |
13 |
| - |
14 |
| -```bash |
15 |
| -docker-compose build |
16 |
| -``` |
17 |
| - |
18 |
| -after the containers are built they can be started with |
19 |
| - |
20 |
| -```bash |
21 |
| -docker-compose -p epigraph -f docker-compose.yml --env-file .env_db up --build |
22 |
| -``` |
23 |
| -One the containers are up the database will be accessible from on the host on por 5432 and can be accessed with any postgresql client. |
24 |
| -To stop the containers you can use the following command: |
25 |
| - |
26 |
| -```bash |
27 |
| -docker-compose -p epigraph -f docker-compose.yml --env-file .env_db down |
28 |
| -``` |
29 |
| - |
30 |
| -While the containers are up, you can also access the Shinyapp running in the container, |
31 |
| -by pointing your browser to [http://localhost:3838](http://localhost:3838). |
32 |
| -## Running the shinyapp from the terminal |
33 |
| -For development purposes it may be convenient to simply run the app outside the container for testing. |
34 |
| - |
35 |
| -In this case, use this command, from the root of the repository: |
36 |
| -``` |
37 |
| -R -e "require(shiny); runApp('shinyapp', host='0.0.0.0', port=3838)" |
38 |
| -``` |
39 |
| - |
40 |
| -### Upgrading Base images |
41 |
| -From time-to-time it is useful to update the containers with the latest versions of base images (PosgreSQL, pgadmin4, etc). This can be achieved with the following command: |
42 |
| - |
43 |
| -```bash |
44 |
| -docker-compose down && docker-compose build --pull && docker-compose up -d |
45 |
| -``` |
46 |
| - |
47 |
| -## Running shinyapp with Rstudio |
48 |
| - |
49 |
| -### Step 0 |
50 |
| -If you're working on the code and need to get the app up and down easily for feedback you can still use Rstudio to launch it locally. |
51 |
| -If you have only worked with Renku in our project you will neet to download R & Rstudio first avilable at : |
52 |
| - |
53 |
| -https://cran.r-project.org/mirrors.html |
54 |
| - |
55 |
| -https://rstudio.com/products/rstudio/ |
56 |
| - |
57 |
| -### Step 1 |
58 |
| -Once Rstudio is setup you can select the cloned repo GRAPHnetEpiApp and launch the project. |
59 |
| - |
60 |
| -### Step 2 |
61 |
| - |
62 |
| -Open in the editor either ui.R / server.R or global.R and in the editor's toolbar you will find the "Run App" button, click it and _voilà_ |
63 |
| - |
64 |
| -In your console, you will have a line notifying you on which adress you can open the app in your navigator. Copy the link in your adress bar and _voilà_ |
65 |
| - |
66 |
| - |
67 |
| - |
68 |
| - |
69 |
| -## To Know more |
70 |
| -### Working with containers |
71 |
| -* [Getting started with Docker](https://docs.docker.com/get-started/overview/) |
72 |
| -* [Overview of Docker Compose](https://docs.docker.com/compose/) |
73 |
| -* [Docker desktop ( for Mac and Windows users)](https://docs.docker.com/desktop/) |
74 |
| -* [Using Docker as Shiny server](https://github.com/rocker-org/shiny) |
| 1 | +# EpiGraphHub Shiny App |
| 2 | + |
| 3 | + |
| 4 | +This application provides an interactive analytical COVID-19 dashboard for the African continent. |
| 5 | + |
| 6 | +## Deploying the App |
| 7 | +The application can be run locally or from Docker containers. |
| 8 | +before Building the container make sure an `.env_db` file exists with the proper variables declared. |
| 9 | + |
| 10 | +to start the containers, you need to have docker and docker-compose installed. Make sure you have the |
| 11 | +following directories in the root of your clone of this repository: `cleanCSV`(containins linelist CSVs) |
| 12 | +`maps` (containing the mapps in Geopackage format to be loaded), and `dicts` (containing the name dictionaries |
| 13 | +as JSON files). Then run the following command: |
| 14 | + |
| 15 | +```bash |
| 16 | +docker-compose build |
| 17 | +``` |
| 18 | + |
| 19 | +after the containers are built they can be started with |
| 20 | + |
| 21 | +```bash |
| 22 | +docker-compose -p epigraph -f docker-compose.yml --env-file .env_db up --build |
| 23 | +``` |
| 24 | +One the containers are up the database will be accessible from on the host on por 5432 and can be accessed with any postgresql client. |
| 25 | +To stop the containers you can use the following command: |
| 26 | + |
| 27 | +```bash |
| 28 | +docker-compose -p epigraph -f docker-compose.yml --env-file .env_db down |
| 29 | +``` |
| 30 | + |
| 31 | +While the containers are up, you can also access the Shinyapp running in the container, |
| 32 | +by pointing your browser to [http://localhost:3838](http://localhost:3838). |
| 33 | +## Running the shinyapp from the terminal |
| 34 | +For development purposes it may be convenient to simply run the app outside the container for testing. |
| 35 | + |
| 36 | +In this case, use this command, from the root of the repository: |
| 37 | +``` |
| 38 | +R -e "require(shiny); runApp('shinyapp', host='0.0.0.0', port=3838)" |
| 39 | +``` |
| 40 | + |
| 41 | +### Upgrading Base images |
| 42 | +From time-to-time it is useful to update the containers with the latest versions of base images (PosgreSQL, pgadmin4, etc). This can be achieved with the following command: |
| 43 | + |
| 44 | +```bash |
| 45 | +docker-compose down && docker-compose build --pull && docker-compose up -d |
| 46 | +``` |
| 47 | + |
| 48 | +## Running shinyapp with Rstudio |
| 49 | + |
| 50 | +### Step 0 |
| 51 | +If you're working on the code and need to get the app up and down easily for feedback you can still use Rstudio to launch it locally. |
| 52 | +If you have only worked with Renku in our project you will neet to download R & Rstudio first avilable at : |
| 53 | + |
| 54 | +https://cran.r-project.org/mirrors.html |
| 55 | + |
| 56 | +https://rstudio.com/products/rstudio/ |
| 57 | + |
| 58 | +### Step 1 |
| 59 | +Once Rstudio is setup you can select the cloned repo GRAPHnetEpiApp and launch the project. |
| 60 | + |
| 61 | +### Step 2 |
| 62 | + |
| 63 | +Open in the editor either ui.R / server.R or global.R and in the editor's toolbar you will find the "Run App" button, click it and _voilà_ |
| 64 | + |
| 65 | +In your console, you will have a line notifying you on which adress you can open the app in your navigator. Copy the link in your adress bar and _voilà_ |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | +## To Know more |
| 71 | +### Working with containers |
| 72 | +* [Getting started with Docker](https://docs.docker.com/get-started/overview/) |
| 73 | +* [Overview of Docker Compose](https://docs.docker.com/compose/) |
| 74 | +* [Docker desktop ( for Mac and Windows users)](https://docs.docker.com/desktop/) |
| 75 | +* [Using Docker as Shiny server](https://github.com/rocker-org/shiny) |
0 commit comments