[GH-ISSUE #307] Need help: How to change the Data Folder using Docker compose? #243

Open
opened 2026-02-25 21:31:31 +03:00 by kerem · 3 comments
Owner

Originally created by @Muchacho89 on GitHub (Feb 15, 2021).
Original GitHub issue: https://github.com/ciur/papermerge/issues/307

Hi guys,

I installed Papermerge succcessfully via docker-compose. I can use it via Webservice, and OCR works fine.
But I have no clue, how can I change the Data Folder of the Papermerge App?

I followed the Docker HowTo but the Media_dir is still: MEDIA_DIR = "/opt/media"
I would like to change the path. e.g. to /Home

Is it possible and where I have to make the changes?

Thank you very much!

Originally created by @Muchacho89 on GitHub (Feb 15, 2021). Original GitHub issue: https://github.com/ciur/papermerge/issues/307 Hi guys, I installed Papermerge succcessfully via docker-compose. I can use it via Webservice, and OCR works fine. But I have no clue, how can I change the Data Folder of the Papermerge App? I followed the Docker HowTo but the Media_dir is still: MEDIA_DIR = "/opt/media" I would like to change the path. e.g. to /Home Is it possible and where I have to make the changes? Thank you very much!
Author
Owner

@napcae commented on GitHub (Feb 16, 2021):

What are you trying to achieve? Want to change the mount point on your local host? By default papermerge uses named volumes

github.com/ciur/papermerge@b0ce649901/docker/1.4/docker-compose.yml (L13-L15)

If you want to use a local directory you can specify it with an absolute path:

[...]
    volumes:
      - /path/on/docker/host:/opt/media
[...]

Changing the right part of the path, i.e. "/opt/media" would change it in the container. You would need to change the papermerge configuration to reflect this as well.

<!-- gh-comment-id:779909382 --> @napcae commented on GitHub (Feb 16, 2021): What are you trying to achieve? Want to change the mount point on your local host? By default papermerge uses [named volumes](https://docs.docker.com/storage/volumes/) https://github.com/ciur/papermerge/blob/b0ce64990143c460dec2f8ea6a8affed7080ca4d/docker/1.4/docker-compose.yml#L13-L15 If you want to use a local directory you can specify it with an absolute path: ``` [...] volumes: - /path/on/docker/host:/opt/media [...] ``` Changing the right part of the path, i.e. "/opt/media" would change it in the container. You would need to change the papermerge configuration to reflect this as well.
Author
Owner

@Muchacho89 commented on GitHub (Feb 16, 2021):

Hi, thanks for your reply!

My goal is to safe the uploaded documents on another drive.
Docker is installed on the system drive and Papermerge as well.

But the Documents should be safed on my Data Drive.

System Drive: Docker + Papermerge --> Upload a Document --> Safe Document on the Data Drive

If I understand you corretly, I only have to change the Volume Path in the yml document?
For example:

version: '3.7' services: app: image: eugenci/papermerge:1.5.5 build: context: . dockerfile: app.dockerfile container_name: papermerge_app ports: - "8000:8000" depends_on: - db - redis volumes: - **/media:**/opt/media

Is it correct?

<!-- gh-comment-id:780060239 --> @Muchacho89 commented on GitHub (Feb 16, 2021): Hi, thanks for your reply! My goal is to safe the uploaded documents on another drive. Docker is installed on the system drive and Papermerge as well. But the Documents should be safed on my Data Drive. System Drive: Docker + Papermerge --> Upload a Document --> Safe Document on the Data Drive If I understand you corretly, I only have to change the Volume Path in the yml document? For example: `version: '3.7' services: app: image: eugenci/papermerge:1.5.5 build: context: . dockerfile: app.dockerfile container_name: papermerge_app ports: - "8000:8000" depends_on: - db - redis volumes: - **/media:**/opt/media ` Is it correct?
Author
Owner

@napcae commented on GitHub (Feb 17, 2021):

That would be correct, although I don't understand why you want to change the path inside the container, i.e. "**/opt/media".

<!-- gh-comment-id:780396253 --> @napcae commented on GitHub (Feb 17, 2021): That would be correct, although I don't understand why you want to change the path inside the container, i.e. "**/opt/media".
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/papermerge#243
No description provided.