Commit 24bd33a3 authored by Conor Anderson's avatar Conor Anderson

Some fixes winter 2020

parent c1bce0e4
......@@ -20,6 +20,7 @@ services:
lb:
image: 'dockercloud/haproxy:1.2.1'
restart: always
links:
- plumber:8000
volumes:
......@@ -27,8 +28,11 @@ services:
haproxy:
image: eeacms/haproxy
restart: always
depends_on:
- conjuntool
volumes:
- ./configure.py:/configure.py
environment:
FRONTEND_PORT: "80"
BACKENDS: "conjuntool"
......@@ -36,5 +40,7 @@ services:
DNS_ENABLED: "true"
LOG_LEVEL: "info"
COOKIES_ENABLED: "true"
INTER: "10s"
FALL: "5"
expose:
- 80
......@@ -3,11 +3,14 @@ MAINTAINER Conor Anderson <[email protected]>
COPY api/plumber.R /api/plumber.R
RUN echo 'deb http://deb.debian.org/debian bullseye main' > /etc/apt/sources.list
RUN apt-get update &&\
apt-get install -y --no-install-recommends curl libnetcdf-dev &&\
apt-get clean && rm -rf /tmp/* /var/lib/apt/lists/*
RUN cd /api &&\
RUN cd /api &&\
Rscript -e "source('https://install-github.me/pacificclimate/ncdf4.helpers')" &&\
Rscript -e "source('https://gitlab.com/ConorIA/conjuntool/snippets/1788463/raw')" &&\
rm -rf /tmp/*
......
......@@ -10,6 +10,8 @@ RUN apt-get update &&\
RUN mv /srv/shiny-server/app/shiny-server.conf /etc/shiny-server/shiny-server.conf
RUN cd /srv/shiny-server/app &&\
Rscript -e "install.packages(\"devtools\", repos = \"https://cloud.r-project.org/\")" &&\
Rscript -e "source(\"https://gitlab.com/ConorIA/conjuntool/snippets/1788463/raw\")" &&\
Rscript -e "devtools::install_github(\"rstudio/DT\")" &&\
sudo -u shiny bash -c "Rscript -e \"webshot::install_phantomjs()\"" &&\
rm -rf /tmp/*
......@@ -3,6 +3,7 @@ library("shiny")
library("broom")
library("doParallel")
library("dplyr")
library("DT")
library("ggplot2")
library("googleway")
library("htmlwidgets")
......@@ -308,7 +309,7 @@ shinyServer(function(input, output, session) {
})
## ----------------------------------- ##
output$anoms_out <- renderDataTable({
output$anoms_out <- renderDT({
validate(need(get_anom_ts(), "Need to compile the time series!"))
final_anom_data()
})
......
library("shiny")
library("shinydashboard")
library("DT")
library("leaflet")
library("lubridate")
library("plotly")
......@@ -120,7 +121,7 @@ dashboardPage(
HTML('<p style="font-size:20px" align="right"><i class="fas fa-circle-notch fa-spin"></i> <b>Recalculating</b></p>')),
conditionalPanel("output.anoms_out", htmlOutput("anom_table_header")),
uiOutput("precip_anom_note"),
div(style = 'overflow-x: scroll', dataTableOutput("anoms_out")),
div(style = 'overflow-x: scroll', DTOutput("anoms_out")),
br(),
conditionalPanel("output.anoms_out",
downloadButton("download_data", "Download this table"),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment