-
Notifications
You must be signed in to change notification settings - Fork 2
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 #18 from jimbrig/main
Enhancement: Added Docker Container Support
- Loading branch information
Showing
14 changed files
with
222 additions
and
339 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 |
---|---|---|
|
@@ -29,3 +29,5 @@ testdata/ | |
^R/rsconnect$ | ||
^app\.R$ | ||
^dev$ | ||
^\.dockerignore$ | ||
^Dockerfile$ |
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,7 @@ | ||
.RData | ||
.Rhistory | ||
.git | ||
.gitignore | ||
manifest.json | ||
rsconnect/ | ||
.Rproj.user |
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,23 @@ | ||
name: Publish-Docker | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3.5.2 | ||
- name: Publish to Registry | ||
uses: elgohr/Publish-Docker-Github-Action@v5 | ||
with: | ||
name: ${{ github.repository }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
registry: ghcr.io | ||
default_branch: main | ||
workdir: . | ||
tags: ${{ github.ref_name }} | ||
tag_semver: true |
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 |
---|---|---|
@@ -1,41 +1,42 @@ | ||
Package: shinymde | ||
Title: A Shiny Interface to mde, the missing data explorer | ||
Version: 0.1.2.9000 | ||
Authors@R: | ||
person(given = "Nelson", | ||
family = "Gonzabato", | ||
role = c("aut", "cre"), | ||
email = "gonzabato@hotmail.com") | ||
Description: Shiny applications provide an easy way for users to perform simple | ||
or complex analyses. The package (app), "shinymde" provides a graphical user | ||
interface to "mde", the missing data explorer R package. | ||
Title: A Shiny Interface to mde, the missing data explorer | ||
Version: 0.1.3 | ||
Authors@R: c( | ||
person("Nelson", "Gonzabato", , "gonzabato@hotmail.com", role = c("aut", "cre")), | ||
person("Jimmy", "Briggs", , "jimmy.briggs@jimbrig.com", role = "ctb") | ||
) | ||
Description: Shiny applications provide an easy way for users to perform | ||
simple or complex analyses. The package (app), "shinymde" provides a | ||
graphical user interface to "mde", the missing data explorer R | ||
package. | ||
License: MIT + file LICENSE | ||
Encoding: UTF-8 | ||
Roxygen: list(markdown = TRUE) | ||
RoxygenNote: 7.1.2 | ||
URL: https://github.com/Nelson-Gon/shinymde | ||
BugReports: https://github.com/Nelson-Gon/shinymde/issues | ||
Depends: | ||
shiny (>= 1.6.0), | ||
shinydashboard (>= 0.7.1) | ||
Imports: | ||
config (>= 0.3.1), | ||
dplyr (>= 1.0.7), | ||
forcats (>= 0.5.1), | ||
ggplot2 (>= 3.3.4), | ||
golem (>= 0.3.1), | ||
grDevices, | ||
magrittr (>= 2.0.1), | ||
mde, | ||
methods, | ||
readxl (>= 1.3.1), | ||
shinyjs (>= 2.0.0), | ||
vroom (>= 1.5.3), | ||
shinycssloaders (>= 1.0.0), | ||
shinyFeedback (>= 0.3.0), | ||
magrittr (>= 2.0.1), | ||
golem (>= 0.3.1), | ||
config (>= 0.3.1), | ||
mde (>= 0.3.1), | ||
shinyjs (>= 2.0.0), | ||
shinyWidgets (>= 0.6.2), | ||
shinycssloaders (>= 1.0.0) | ||
Depends: | ||
shiny (>= 1.6.0), | ||
shinydashboard (>= 0.7.1) | ||
Remotes: | ||
Nelson-Gon/mde | ||
utils, | ||
vroom (>= 1.5.3) | ||
Suggests: | ||
knitr, | ||
rmarkdown, | ||
markdown | ||
VignetteBuilder: knitr | ||
rmarkdown | ||
VignetteBuilder: | ||
knitr | ||
Encoding: UTF-8 | ||
Roxygen: list(markdown = TRUE) | ||
RoxygenNote: 7.2.3 |
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,29 @@ | ||
FROM rocker/verse:4.3.0 | ||
RUN apt-get update && apt-get install -y libicu-dev make pandoc zlib1g-dev && rm -rf /var/lib/apt/lists/* | ||
RUN mkdir -p /usr/local/lib/R/etc/ /usr/lib/R/etc/ | ||
RUN echo "options(repos = c(CRAN = 'https://cran.rstudio.com/'), download.file.method = 'libcurl', Ncpus = 4)" | tee /usr/local/lib/R/etc/Rprofile.site | tee /usr/lib/R/etc/Rprofile.site | ||
RUN R -e 'install.packages("remotes")' | ||
RUN Rscript -e 'remotes::install_version("magrittr",upgrade="never", version = "2.0.3")' | ||
RUN Rscript -e 'remotes::install_version("dplyr",upgrade="never", version = "1.1.2")' | ||
RUN Rscript -e 'remotes::install_version("knitr",upgrade="never", version = "1.42")' | ||
RUN Rscript -e 'remotes::install_version("shiny",upgrade="never", version = "1.7.4")' | ||
RUN Rscript -e 'remotes::install_version("config",upgrade="never", version = "0.3.1")' | ||
RUN Rscript -e 'remotes::install_version("rmarkdown",upgrade="never", version = "2.21")' | ||
RUN Rscript -e 'remotes::install_version("vroom",upgrade="never", version = "1.6.3")' | ||
RUN Rscript -e 'remotes::install_version("shinyWidgets",upgrade="never", version = "0.7.6")' | ||
RUN Rscript -e 'remotes::install_version("shinyjs",upgrade="never", version = "2.1.0")' | ||
RUN Rscript -e 'remotes::install_version("shinyFeedback",upgrade="never", version = "0.4.0")' | ||
RUN Rscript -e 'remotes::install_version("shinycssloaders",upgrade="never", version = "1.0.0")' | ||
RUN Rscript -e 'remotes::install_version("readxl",upgrade="never", version = "1.4.2")' | ||
RUN Rscript -e 'remotes::install_version("golem",upgrade="never", version = "0.4.0")' | ||
RUN Rscript -e 'remotes::install_version("ggplot2",upgrade="never", version = "3.4.2")' | ||
RUN Rscript -e 'remotes::install_version("forcats",upgrade="never", version = "1.0.0")' | ||
RUN Rscript -e 'remotes::install_version("shinydashboard",upgrade="never", version = "0.7.2")' | ||
RUN Rscript -e 'remotes::install_cran("mde")' | ||
RUN mkdir /build_zone | ||
ADD . /build_zone | ||
WORKDIR /build_zone | ||
RUN R -e 'remotes::install_local(upgrade="never")' | ||
RUN rm -rf /build_zone | ||
EXPOSE 80 | ||
CMD R -e "options('shiny.port'=80,shiny.host='0.0.0.0');library(shinymde);shinymde::run_app()" |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
path.n: NAMESPACE | ||
path.d: DESCRIPTION | ||
dir.r: R | ||
dir.v: vignettes | ||
dir.t: tests | ||
extra.suggests: ~ | ||
pkg_ignore: ~ | ||
document: yes | ||
normalize: yes | ||
inside_rmd: no | ||
must.exist: yes | ||
check_if_suggests_is_installed: yes |
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,29 @@ | ||
#!/usr/bin/env pwsh | ||
# -*- coding: utf-8 -*- | ||
|
||
# Set Variables | ||
$GH_USER="jimbrig" | ||
$GH_REPO="shinymde" | ||
$DOCKER_TAG="latest" | ||
$DOCKER_DESCRIPTION="ShinyMDE Container Image" | ||
$GH_PAT=$Env:GITHUB_API_TOKEN | ||
|
||
$IMAGE_SOURCE="https://github.com/" + $GH_USER + "/" + $GH_REPO | ||
$IMAGE_REF="ghcr.io/$GH_USER/$GH_REPO" + ':' + $DOCKER_TAG | ||
|
||
# Create Container | ||
RScript -e "golem::add_dockerfile()" | ||
|
||
# Login | ||
echo $GH_PAT | docker login ghcr.io -u $GH_USER --password-stdin | ||
|
||
# Build | ||
docker build ` | ||
--label "org.opencontainers.image.source=https://github.com/$GH_USER/$GH_REPO" ` | ||
--label "org.opencontainers.image.description=$DOCKER_DESCRIPTION" ` | ||
--label "org.opencontainers.image.licenses=MIT" ` | ||
-t $IMAGE_REF ` | ||
. | ||
|
||
# Push | ||
docker push $IMAGE_REF |
Oops, something went wrong.