Skip to content

Commit

Permalink
Merge pull request #2 from samuelbharti/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
samuelbharti authored Sep 25, 2024
2 parents 766cc1b + aa73c20 commit 6331066
Show file tree
Hide file tree
Showing 15 changed files with 84 additions and 1 deletion.
Empty file added .Renviron
Empty file.
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Base R Shiny image
FROM rocker/shiny

# Install R dependencies
RUN R -e 'install.packages()'

RUN mkdir home/my_app

# Copy the Shiny app code
COPY *.R /home/my_app

# Expose the application port
EXPOSE 3838

# Run the R Shiny app
CMD R -e 'shiny::runApp(`/home/my_app`,port = 3838, host = `0.0.0.0`)'
5 changes: 5 additions & 0 deletions R/load_components.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Load modules
sapply(list.files('modules', full.names = TRUE), function(x) source(x))
# Load user interface
sapply(list.files('userInterface', full.names = TRUE), function(x) source(x))

26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,25 @@
# RShiny_template
# Project Title

Add project description

# Requirements

Add requirements to run this app.

# How to run this Shiny App

Add instructions and configurations needed to run this app.

# Deployment

Add current deployment URLs.

# Docker Image

Add URL/tag for docker image pull.

# Contribution

------------------------------------------------------------------------

Template developed by \@[samuelbharti](https://github.com/SamuelBharti). Use R package available at [samuelbharti/peacock](https://github.com/samuelbharti/peacock) for local development.
Empty file added data/.gitkeep.gitkeep
Empty file.
3 changes: 3 additions & 0 deletions dev/dev.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Use this script to test code blocks for app dev.
# Make sure to add this "dev" directory
# in your gitignore after template initialization.
7 changes: 7 additions & 0 deletions global.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Load libraries/ Source Files
library(shiny)

# Load data/connections

# Preprocess small data

1 change: 1 addition & 0 deletions modules/test_mod.R
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Use shinymod to generate module template
4 changes: 4 additions & 0 deletions server.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Shiny Server
function(input, output, session) {

}
5 changes: 5 additions & 0 deletions ui.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
navbarPage(
'My app',
tabPanel('Home', home_page),
tabPanel('Other', other_page),
)
9 changes: 9 additions & 0 deletions userInterface/home_ui.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
home_page <- fluidPage(
# Page title
titlePanel('Home Page'),
hr(),
fluidRow(
column(6,h2('Column size 3')),
column(6,h2('Column size 3'))
)
)
9 changes: 9 additions & 0 deletions userInterface/other_ui.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
other_page <- fluidPage(
# Page title
titlePanel('Other Page'),
hr(),
fluidRow(
column(6,h2('Column size 3')),
column(6,h2('Column size 3'))
)
)
Empty file added www/css/.gitkeep
Empty file.
Empty file added www/img/.gitkeep.gitkeep
Empty file.
Empty file added www/js/.gitkeep.gitkeep
Empty file.

0 comments on commit 6331066

Please sign in to comment.