diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index abe9ff2dbd042380379a75e1ffc494950d677b6a..bf6e7ae8cdcd9f47ca1177cfe04d7fff4df682ce 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -57,26 +57,3 @@ build: matrix: - R_VERSION: ["3.6.3", "4.2.3", "latest"] SHINY_SERVER_VERSION: ["latest"] - - -build-example: - stage: build - needs: ["build"] - only: - - main - before_script: - - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - script: - # pull the latest example of rshiny-k8s image - - docker pull "$CI_REGISTRY_IMAGE/example:example" || true - # build the image while passing commit SHA and versions, and tagging the image with them - - docker build - --cache-from "$CI_REGISTRY_IMAGE/example:latest" - --tag "$CI_REGISTRY_IMAGE/example:latest" - --tag "$CI_REGISTRY_IMAGE/example:$CI_COMMIT_SHORT_SHA" - -f example.Dockerfile - ./ - # push image tagged as example - - docker push "$CI_REGISTRY_IMAGE/example:latest" - # push image tagged as example with its commit sha (debug purpose) - - docker push "$CI_REGISTRY_IMAGE/example:$CI_COMMIT_SHORT_SHA" diff --git a/example-in-pod.yaml b/example-in-pod.yaml deleted file mode 100644 index c2b5ddccd149a8cc43e10d4038a46de9d4eecb04..0000000000000000000000000000000000000000 --- a/example-in-pod.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: example -spec: - containers: - - name: example - image: registry-gitlab.pasteur.fr/hub/rshiny-k8s/example:latest - securityContext: - runAsGroup: 999 - runAsUser: 999 - ports: - - name: http - containerPort: 3838 - protocol: TCP diff --git a/example.Dockerfile b/example.Dockerfile deleted file mode 100644 index 260e5d9c94a7e566e310f578ab417e4c22b80624..0000000000000000000000000000000000000000 --- a/example.Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -# FROM registry-gitlab.pasteur.fr/hub/rshiny-k8s:4.2.3--1.5.21.1006 -# FROM registry-gitlab.pasteur.fr/hub/rshiny-k8s:1.5.21.1006 -# FROM registry-gitlab.pasteur.fr/hub/rshiny-k8s:4.2.3 -FROM registry-gitlab.pasteur.fr/hub/rshiny-k8s:latest - -# Copy your dependencies, destination filename must be "packages_to_install.csv" -COPY ./example_proj/my_packages_to_install.csv /opt/scripts/packages_to_install.csv - -# Install R packages -RUN Rscript /opt/scripts/install_r_packages.R - -# Copy you shiny app -COPY ./example_proj /srv/shiny-server - diff --git a/example_proj/DESCRIPTION b/example_proj/DESCRIPTION deleted file mode 100644 index fd1d5a52803e4ee7a7e62e8592bb19a1771cc60a..0000000000000000000000000000000000000000 --- a/example_proj/DESCRIPTION +++ /dev/null @@ -1,7 +0,0 @@ -Title: Hello Shiny! -Author: RStudio, Inc. -AuthorUrl: http://www.rstudio.com/ -License: MIT -DisplayMode: Showcase -Tags: getting-started -Type: Shiny diff --git a/example_proj/Readme.md b/example_proj/Readme.md deleted file mode 100644 index 5842d0649643a0515d1c0c97f40b4db1eaf61240..0000000000000000000000000000000000000000 --- a/example_proj/Readme.md +++ /dev/null @@ -1,5 +0,0 @@ -This small Shiny application demonstrates Shiny's automatic UI updates. - -Move the *Number of bins* slider and notice how the `renderPlot` expression is automatically re-evaluated when its dependant, `input$bins`, changes, causing a histogram with a new number of bins to be rendered. - -Adapt from shiny examples. \ No newline at end of file diff --git a/example_proj/app.R b/example_proj/app.R deleted file mode 100644 index 2d93f4564e5db8e3f518c4f5a658cbc8e3f43966..0000000000000000000000000000000000000000 --- a/example_proj/app.R +++ /dev/null @@ -1,72 +0,0 @@ -# Name : app.R -# Folder : ~/rshiny-k8s/example_proj -# Date : 05/04/23 -# Aim : Simple example of app developped in RShiny. -# Authors : From Shiny Examples - Modify by Elodie C. et Bryan B. - - -# Load packages ------------------------------------------------------------------- -library(shiny) -# Optional librairies - only for test. -# Cran and bioconductor librairies -library(shinythemes) -library(biomaRt) - -# UI part ------------------------------------------------------------------------- -# Define UI for app that draws a histogram ---- -ui <- fluidPage( - - # App title ---- - titlePanel("Hello Shiny in docker image!"), - - # Sidebar layout with input and output definitions ---- - sidebarLayout( - - # Sidebar panel for inputs ---- - sidebarPanel( - - # Input: Slider for the number of bins ---- - sliderInput(inputId = "bins", - label = "Number of bins:", - min = 1, - max = 50, - value = 30) - - ), - - # Main panel for displaying outputs ---- - mainPanel( - - # Output: Histogram ---- - plotOutput(outputId = "distPlot") - - ) - ) -) -# Server part ------------------------------------------------------------------------- -# Define server logic required to draw a histogram ---- -server <- function(input, output) { - - # Histogram of the Old Faithful Geyser Data ---- - # with requested number of bins - # This expression that generates a histogram is wrapped in a call - # to renderPlot to indicate that: - # - # 1. It is "reactive" and therefore should be automatically - # re-executed when inputs (input$bins) change - # 2. Its output type is a plot - output$distPlot <- renderPlot({ - - x <- faithful$waiting - bins <- seq(min(x), max(x), length.out = input$bins + 1) - - hist(x, breaks = bins, col = "#75AADB", border = "white", - xlab = "Waiting time to next eruption (in mins)", - main = "Histogram of waiting times") - - }) - -} - -# Run Shiny app ---------------------------------------------------------------------- -shinyApp(ui = ui, server = server) diff --git a/example_proj/my_packages_to_install.csv b/example_proj/my_packages_to_install.csv deleted file mode 100644 index e381d71b331cbfb2e6339c5ef1a9d8fb3d557070..0000000000000000000000000000000000000000 --- a/example_proj/my_packages_to_install.csv +++ /dev/null @@ -1,2 +0,0 @@ -shiny -shinythemes