Skip to content

Commit

Permalink
docs: Adds examples for use in docker
Browse files Browse the repository at this point in the history
  • Loading branch information
andyquinterom committed Nov 1, 2024
1 parent 6d65048 commit cecb8ff
Show file tree
Hide file tree
Showing 11 changed files with 2,363 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,11 @@ can control the column `namespace` using the environment variable
`FAUCET_TELEMETRY_NAMESPACE` or cli argument `--telemetry-namespace`. By
default, this value is `"faucet"`.


## Useful links

- [How to Run R Shiny in Docker: A Step-by-Step Guide](https://www.ixpantia.com/en/blog/how-to-run-r-shiny-in-docker-guide)

## Contributing

If you want to contribute to `faucet` please read the
Expand Down
1 change: 1 addition & 0 deletions examples/shiny-docker-renv/.Rprofile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
source("renv/activate.R")
7 changes: 7 additions & 0 deletions examples/shiny-docker-renv/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
renv/library/
renv/local/
renv/cellar/
renv/lock/
renv/python/
renv/sandbox/
renv/staging/
19 changes: 19 additions & 0 deletions examples/shiny-docker-renv/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM ixpantia/faucet:r4.4

# Install extra system dependencies
RUN apt-get update && \
apt-get install -y libssl-dev libcurl4-openssl-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Copy Files to bootstrap renv
COPY renv.lock renv.lock
COPY .Rprofile .Rprofile
COPY renv/ renv/

# Restore Renv
RUN Rscript -e "renv::restore()"

COPY global.R global.R
COPY ui.R ui.R
COPY server.R server.R
4 changes: 4 additions & 0 deletions examples/shiny-docker-renv/global.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
library(shiny)
library(bslib)
library(plotly)
library(ggplot2)
Loading

0 comments on commit cecb8ff

Please sign in to comment.