bcgov / watershedBC

Summarize watershed attributes in BC
https://bcgov-env.shinyapps.io/watershedBC/
Apache License 2.0
6 stars 0 forks source link

Create Development Environment #29

Open 5coho opened 5 months ago

5coho commented 5 months ago

This ticket aims to track progress in creating a development environment. Item to complete:

5coho commented 5 months ago

Working Branch: https://github.com/bcgov/watershedBC/tree/29-dev-environment

5coho commented 5 months ago

Having some issues with using the rocker/rshiny image:

5coho commented 5 months ago

Tables that are not created in the local DB because they have no reference in the app:

bevingtona commented 5 months ago

Having some issues with using the rocker/rshiny image:

  • after installing r dependencies total image size is ~2.3GB which is ridiculous. I'm going to try and build my own and hope for improvement
  • After running app.R using Rscript app.R I get a couple things:

    • The app listens on different ports every time the container restart? It should default to 3838. I'm wondering if the base image is overwriting usage of that port.
    • Even setting the port using options=list(port=3838) port forwarding fails
    • setting network_mode: host gives firewall unrestricted access

Not sure how to solve the container size issue..

Maybe something like r-minimal can be used? https://github.com/r-hub/r-minimal There is a lot of base functionality missing, but we can add it back as needed.

5coho commented 5 months ago

Container issue fixed. Using rocker/r-ver:4.3.3 as base and installing required system geo packages. Greatly reduced the image size and runs much smoother using the R -e "shiny::runApp(...)" then using an R shiny server image.