Access files from parent directory

Hi all,
files structure for my project is as follows:

  • data (directory)
  • app:
    • global. R
    • server. R
    • ui. R
  • Dockerfile

In the code of my shiny app I use …/data/ (2 dots, slash, data - can’t get rid of autocorrection) to access files from data directory and it works. But it seems to be invalid when I dockerize the app. Data directory is a volume I want to keep outside the container. I am not sure how to mount it as a volume, what is the right syntax in this case. It’s all about moving to the parent directory of my app. And the constraint is the code must not be changed, i. e. I still want to use …/data in the code.

All advices are appreciated :slight_smile:

You can mount a volume with container-volumes option as described on the configuration page: https://www.shinyproxy.io/configuration/#apps
If you still want to use ../data in the app, you will need to mount the parent folder of both data and app folders (i.e. your whole project folder and not just the data)

1 Like