- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Which directories should be mounted in docker to persist flows?
- Labels:
-
Apache NiFi
Created 06-24-2023 03:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
After having lost all my test work I decided it is time to investigate how to persist data in NiFi when running it in a docker image. I use the official image. This is what I managed to gather so far:
services:
nifi:
container_name: nifi
image: apache/nifi:latest
ports:
- "8443:8443"
- "16543:16543"
volumes:
- "C:/nifi/data:/data"
- "C:/nifi/state:/opt/nifi/nifi-current/state"
- "C:/nifi/database:/opt/nifi/nifi-current/database_repository"
- "C:/nifi/flowfile:/opt/nifi/nifi-current/flowfile_repository"
- "C:/nifi/content:/opt/nifi/nifi-current/content_repository"
- "C:/nifi/provenance:/opt/nifi/nifi-current/provenance_repository"
When stopping/staring the container everything is OK (login credentials and content)
When removing the container, the credentials are persisted but the content is gone.
I presume that there is yet another directory that I should mount in order to have the data saved there. Which one is it?
Created on 01-22-2024 07:20 AM - edited 01-22-2024 07:21 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Flow definitions are saved in the `conf` dir and at least 2 different approaches can be mentioned to backup it: the first by manually `docker cp`its contents and mount them later as a volume at your next run, while the second leveraging the mount bind option of docker to automatically synchronize the `conf` dir contents with your local dir.