Skip to content

Commit

Permalink
try again
Browse files Browse the repository at this point in the history
  • Loading branch information
rmgpanw committed Nov 14, 2023
1 parent 7fd4731 commit b8d7eac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RUN apt-get update && apt-get install -y supervisor
COPY . /codemapper
RUN Rscript -e 'devtools::install_local(path = "/codemapper", dependencies = TRUE)'
RUN Rscript -e 'install.packages("duckdb", repos="http://cran.us.r-project.org", dependencies=TRUE)' # latest duckdb version not available from posit package manager yet
RUN cd /srv/shiny-server && Rscript -e 'codemapper::all_lkps_maps_to_db()'
RUN cd /srv/shiny-server && rm -rf * && Rscript -e 'codemapper::all_lkps_maps_to_db()'
COPY inst/docker/app.R /srv/shiny-server/app.R

# Set the entry point
Expand Down
8 changes: 3 additions & 5 deletions inst/docker/app.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@ ALL_LKPS_MAPS_DB <- "./all_lkps_maps.db"

# User can supply their own db by mounting a folder called `all_lkps_maps`
# containing `all_lkps_maps.db`, to the container root directory
if (dir.exists("/all_lkps_maps")) {
USER_SUPPLIED_DB_PATH <- "/all_lkps_maps/all_lkps_maps.db"
if (file.exists(USER_SUPPLIED_DB_PATH)) {
ALL_LKPS_MAPS_DB <- USER_SUPPLIED_DB_PATH
}
USER_SUPPLIED_DB_PATH <- "/all_lkps_maps/all_lkps_maps.db"
if (file.exists(USER_SUPPLIED_DB_PATH)) {
ALL_LKPS_MAPS_DB <- USER_SUPPLIED_DB_PATH
}

# Run app
Expand Down

0 comments on commit b8d7eac

Please sign in to comment.