Skip to main content

How is data persisted?

VxPlatform persists a) Postgres data and b) select blob/file data. Volumes are mounted at jumphost:/opt/virdx/vxplatform/prod/persistence.

Postgres Data

Postgres data is persisted by mounting the Postgres container's data directory (/var/lib/postgresql/data) to a the postgres-data directory within the persistence folder mentioned above.

Blob/File Data

Other files, such as certain Volumes or VxAnnotate-exported annotation volumes are stored on the server's NFS server at /mnt/storage/projects/vxplatform/prod/persistence/mounted-data.

Inside the containers, this folder is typically mounted to /mnt/storage. Applications inside containers use the $STORAGE_MOUNT env variable - typically set to /mnt/storage - to determine where to read/write from.

In resources stored on VxPlatform, we refer to paths in this mounted storage by prefixing them with file://. We'd store a VxAnnotate mask for example under /mnt/storage/vxannotate-data/.../mask.nii.gz and refer to it in the database as file://vxannotate-data/.../mask.nii.gz.

We're interpreting non-file://-prefixed paths as paths on the server's local filesystem. Consequently, these are typically not accessible from within the containers.

Persisted file data for dev environments

By setting the STORAGE_LOCAL environment variable in the .env file, you can point the dev containers to use any local directory on your machine when using bash deploy_local.sh for local development.