How to map Bitbucket caches/ to a different Docker volume?

Dominik December 1, 2022

Hi

We're running Bitbucket in a Docker container (bitbucket-server:7.21.5) and expose the entire Bitbucket HOME to the host (to an NFS mount /mnt/atlassian/):

volumes:
- /mnt/atlassian/bitbucket:/var/atlassian/application-data/bitbucket

Now we want to move the caches/ directory to a different partition (not part of NFS because caches don't need to be backed up). This is also recommended on scaling-bitbucket-server:

It may be desirable to use a separate disk or partition mounted at $BITBUCKET_HOME/caches to allow for more disk space and to ensure cached packs don't fill up the same disk where other system data is stored

I could create a second volume of the 'caches' subdirectory, but this appears unconventional and therefore risky:

volumes:
- /mnt/atlassian/bitbucket:/var/atlassian/application-data/bitbucket
- /var/atlassian/bitbucket/caches:/var/atlassian/application-data/bitbucket/caches

Are there any recommendations on how to do this?
Is is safe to create a Docker volume of a directory that is already part of another volume?

Regards
Dominik

 

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
7.21.5
TAGS
AUG Leaders

Atlassian Community Events