Public | Automated Build

Last pushed: 13 days ago
Short Description
An empty Postgres database template for use with `inSpaDES` applications.
Full Description

inSpaDES-CFS-app

CFS proof of concept app build using the inSpaDES package.

This repository currently only holds the Dockerfiles needed to build the inspades-cfs-app and inspades-db images.
These Dockerfiles are snapshots of the files in the eliotmcintire/SpaDESUI repo.

Running the app:

  1. Run the database container then link it to the app container:

    # run the db container
    docker run -e POSTGRES_DB='inspades_cfs' -e POSTGRES_USER='shiny' \
     -e POSTGRES_PASSWORD='mysecurepassword' -d -P \
     --name inspades-cfs-db achubaty/inspades-db
    
    # run the app container
    docker run -d -P --link inspades-cfs-db \
     --name inspades-cfs-app  achubaty/inspades-cfs-app
    

    For development purposes, it's useful to use a config file on the host, attached to the running container:

    APP_CONFIG=/path/to/my/config/dir   # change this location and edit the file as needed
    
    docker run -d -P --link inspades-cfs-db \
     -v ${APP_CONFIG}:/srv/shiny-server/SpaDESUI/_config \
     --name inspades-cfs-app achubaty/inspades-cfs-app
    
  2. Edit the app config file:

    docker exec -it inspades-cfs-app bash
    
    nano /srv/shiny-server/SpaDESUI/_config/_config.yml
    
  3. Add LCC 2005 modules to the database:

    First, edit /SpaDESUI/apps/CFS/deploy/moduleInsert.R to ensure the correct app dir is being used:

    docker exec -it inspades-cfs-app bash
    > nano /SpaDESUI/apps/CFS/deploy/moduleInsert.R
    

    Then, insert the modules into the database:

    docker exec -it inspades-cfs-app bash -c "cd /srv/shiny-server/SpaDESUI && xvfb-run -a Rscript /SpaDESUI/apps/CFS/deploy/moduleInsert.R"
    
  4. Point your browser at the app running inside the container:

    # e.g.,
    http://172.17.0.1:3838/SpaDESUI
    
Docker Pull Command
Owner
achubaty
Source Repository

Comments (0)