I have an instance of Jira running on an Ubuntu server with docker-compose.
I initially set it up by mapping the jira installation folder to a docker volume called jiravolume.
volumes:
- jiravolume:/var/atlassian/application-data/jira
To have easier access to the data, I would like to have this folder directly inside a folder on the Ubuntu server.
First of all, is there any difference in terms of performance/security?
If none, what are the steps to achieve this?
Let's assume that I want the data in a folder with a path (relative to the docker-compose file) like this: ./persist/jira/installfolder Do I need to create the folder structure on the server first and then change the docker-compose to become:
volumes:
- ./persist/jira/installfolder:/var/atlassian/application-data/jira
Is the data now automatically copied in the new folder or is it still in the old volume and so now jira is pointing to an empty folder?
Thank you so much
CodePudding user response:
No that will not work, docker will create a nice empty new folder for you.
If on linux, your volume should be stored here: /var/lib/docker/volumes
You could:
- create
./persist/jira/installfolderand - copy the files over. Then
- you'll have to change permissions on your files. And
- Make the changes you proposed in
docker-compose.yaml - Restart docker-compose. (
docker-compose down && docker-compose upshould be enough)
Mind you:
If that path ./persist/jira/installfolder is inside your docker context you might have to check your Dockerfile to see about any COPY or ADD statements. If for example you have a COPY . . somewhere, you run the risk of copying your volume into your image if you ever rebuild it.
In that case: either change those statements, or add your path to .dockerignore
