forked from eDrivers/eDriversApp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from Ecosystem-Assessments/CST-241-deploy-app
CST-241 Dockerisation
- Loading branch information
Showing
5 changed files
with
62 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Package: edriver | ||
Title: eDriver | ||
Version: 1.0.0 | ||
Authors@R: | ||
person(given = "David", | ||
family = "Beauchesne", | ||
role = c("aut", "cre"), | ||
email = "david.beauchesne@insileco.io") | ||
Description: Shiny application to visualize eDrivers platform data. | ||
License: GPLv3 + file LICENSE | ||
Imports: | ||
raster, | ||
leaflet, | ||
shiny, | ||
shinyjs, | ||
magrittr, | ||
sf, | ||
dplyr, | ||
tidyr | ||
Encoding: UTF-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Base R Shiny image | ||
FROM rocker/geospatial:latest | ||
|
||
RUN apt-get update && apt-get install -y | ||
|
||
# Copy the Shiny app code | ||
WORKDIR /home/app | ||
ADD . /home/app | ||
|
||
# Install R dependencies | ||
RUN install2.r remotes | ||
RUN Rscript -e 'remotes::install_deps()' | ||
|
||
# Expose the application port | ||
EXPOSE 8083 | ||
|
||
# Run the R Shiny app | ||
CMD Rscript -e "shiny::runApp(port = 8083, host = '0.0.0.0')" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# eDrivers application | ||
|
||
Shiny application to visualize eDrivers platform data. | ||
|
||
## Local deployment | ||
|
||
```bash | ||
Rscript -e "shiny::runApp(port = 8083, host = '0.0.0.0')" | ||
``` | ||
|
||
## Docker deployment | ||
|
||
**Requirements** | ||
|
||
- Install docker on your computer: https://docs.docker.com/engine/install/ | ||
|
||
**Build and deploy the application within a container** | ||
|
||
```bash | ||
docker build -t edrivers . && docker run -p 8083:8083 -it --rm edriver | ||
``` | ||
Deployment tested on `Docker version 25.0.0` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters