mirror of
https://github.com/dylanbenzi/hurricane_normalization_app.git
synced 2026-07-30 05:08:57 +00:00
modify dockerfile and add shiny server config to host rmd
This commit is contained in:
+16
-9
@@ -33,6 +33,7 @@ COPY renv/settings.json renv/settings.json
|
|||||||
|
|
||||||
RUN mkdir -p renv/.cache
|
RUN mkdir -p renv/.cache
|
||||||
ENV RENV_PATHS_CACHE=renv/.cache
|
ENV RENV_PATHS_CACHE=renv/.cache
|
||||||
|
ENV RENV_CONFIG_CACHE_SYMLINKS=FALSE
|
||||||
|
|
||||||
RUN R -s -e "renv::restore()"
|
RUN R -s -e "renv::restore()"
|
||||||
|
|
||||||
@@ -58,15 +59,21 @@ RUN apt-get update && apt-get install -y \
|
|||||||
pandoc \
|
pandoc \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
COPY --from=renv-base /app/renv /app/renv
|
RUN mkdir -p /srv/shiny-server/app
|
||||||
COPY --from=renv-base /app/.Rprofile /app/.Rprofile
|
|
||||||
COPY --from=renv-base /app/renv.lock /app/renv.lock
|
|
||||||
|
|
||||||
COPY dashboard.Rmd dashboard.Rmd
|
COPY --from=renv-base /app/renv /srv/shiny-server/app/renv
|
||||||
COPY queries.R queries.R
|
COPY --from=renv-base /app/.Rprofile /srv/shiny-server/app/.Rprofile
|
||||||
COPY utils.R utils.R
|
COPY --from=renv-base /app/renv.lock /srv/shiny-server/app/renv.lock
|
||||||
COPY config.yml config.yml
|
|
||||||
|
|
||||||
EXPOSE 8080
|
COPY dashboard.Rmd /srv/shiny-server/app/index.Rmd
|
||||||
|
COPY queries.R /srv/shiny-server/app/
|
||||||
|
COPY utils.R /srv/shiny-server/app/
|
||||||
|
COPY config.yml /srv/shiny-server/app/
|
||||||
|
|
||||||
CMD ["R", "-e", "rmarkdown::run('dashboard.Rmd', shiny_args = list(host = '0.0.0.0', port = 8080))"]
|
COPY shiny-server.conf /etc/shiny-server/shiny-server.conf
|
||||||
|
|
||||||
|
RUN chown -R shiny:shiny /srv/shiny-server/app
|
||||||
|
|
||||||
|
EXPOSE 3838
|
||||||
|
|
||||||
|
CMD ["/usr/bin/shiny-server"]
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
# Shiny Server configuration
|
||||||
|
run_as shiny;
|
||||||
|
|
||||||
|
# Define the server
|
||||||
|
server {
|
||||||
|
listen 3838;
|
||||||
|
|
||||||
|
# Define the location for the app
|
||||||
|
location / {
|
||||||
|
site_dir /srv/shiny-server/app;
|
||||||
|
log_dir /var/log/shiny-server;
|
||||||
|
directory_index on;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user