Skip to main content

Mounting Custom Libraries

You can bring your custom libraries and codebase by mounting its directories as a docker volume.

  1. Open .env in root
  2. Add/update HOST_MOUNTS with absolute paths to your directories
  3. Restart the server (./start.sh)

IMPORTANT:

HOST_MOUNTS is a json string representing a list of paths as strings. DO NOT confuse it with a list of strings.

Correct:

HOST_MOUNTS='["/Users/user/Documents/custom_library/direcotry_to_mount"]'

Incorrect:

HOST_MOUNTS=["/Users/user/Documents/custom_library/direcotry_to_mount"]

IMPORTANT:

Each path should be an absolute path to the directory.

Correct:

HOST_MOUNTS='["/Users/user/Documents/custom_library/direcotry_to_mount"]'

Incorrect:

HOST_MOUNTS='["custom_library/direcotry_to_mount"]'

NOTE:

Only the last directory from the path is mounted to docker and it is mounted inside of app/ directory. So /Users/user/Documents/custom_library/direcotry_to_mount will be mounted as /app/direcotry_to_mount.

LSP

To expose your custom packages to LSP, you need to update docker-compose.yml and mount the same directories manually

Update docker-compose.yml as:

..
dropbase-lsp:
image: dropbase/lsp:0.0.6
volumes:
- ./workspace:/project/workspace
- ./files:/project/files
- /Users/user/Documents/custom_library/direcotry_to_mount:project/direcotry_to_mount
..