Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Development Environment #29

Open
4 of 6 tasks
5coho opened this issue Mar 21, 2024 · 5 comments
Open
4 of 6 tasks

Create Development Environment #29

5coho opened this issue Mar 21, 2024 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@5coho
Copy link
Collaborator

5coho commented Mar 21, 2024

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

  • Dockerfile for R Shiny app
  • Dockerfile for PostgreSQL Database
    • Schema matching
    • Test Data
  • Docker Compose file
    • DB
    • App
    • PG Admin
  • Makefile
  • Repo documentation update
  • GitFlow (Not this time)
    • main branch -> Prod
    • dev branch -> Non Prod
    • Branch Protection
@5coho 5coho added the enhancement New feature or request label Mar 21, 2024
@5coho 5coho self-assigned this Mar 21, 2024
@5coho
Copy link
Collaborator Author

5coho commented Mar 21, 2024

@5coho
Copy link
Collaborator Author

5coho commented Mar 27, 2024

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

@5coho
Copy link
Collaborator Author

5coho commented Mar 27, 2024

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

  • public.bc_seasonal_regimes_alex_analysis_jan18_21clust
  • public.bc_seasonal_regimes_alex_analysis_jan18_21clust_wsc_parde_lon
  • public.bc_seasonal_regimes_alex_analysis_jan18_21clust_wsc_parde_lon_s
  • public.spatial_ref_sys
  • public.test
  • public.vri
  • public.watershed_statistics
  • public.wsc_drainagebasin_4326
  • public.wsc_monthly_with_attri_dams_20240204

@bevingtona
Copy link
Collaborator

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
Copy link
Collaborator Author

5coho commented Apr 5, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants