Created
June 8, 2020 16:42
-
-
Save geoHeil/42e213e8532623181cc5fbb65a30981c to your computer and use it in GitHub Desktop.
nifi docker volume persistence
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3" | |
services: | |
zookeeper: # the configuration manager | |
hostname: zookeeper | |
container_name: zookeeper | |
image: 'bitnami/zookeeper:3.6.1' | |
environment: | |
- ALLOW_ANONYMOUS_LOGIN=yes | |
nifi: | |
image: apache/nifi:1.11.4 | |
ports: | |
- 8080:8080 # Unsecured HTTP Web Port | |
environment: | |
- NIFI_WEB_HTTP_PORT=8080 | |
- NIFI_CLUSTER_IS_NODE=true | |
- NIFI_CLUSTER_NODE_PROTOCOL_PORT=8082 | |
- NIFI_ZK_CONNECT_STRING=zookeeper:2181 | |
- NIFI_ELECTION_MAX_WAIT=1 min | |
links: | |
- registry | |
volumes: | |
- ./for_nifi/state:/opt/nifi/nifi-current/state | |
# - ./for_nifi/conf:/opt/nifi/nifi-current/conf | |
- ./for_nifi/db:/opt/nifi/nifi-current/database_repository | |
- ./for_nifi/flowfile:/opt/nifi/nifi-current/flowfile_repository | |
- ./for_nifi/content:/opt/nifi/nifi-current/content_repository | |
- ./for_nifi/provenance:/opt/nifi/nifi-current/provenance_repository | |
- ./for_nifi/logs:/opt/nifi/nifi-current/logs | |
registry: | |
hostname: registry | |
#image: apache/nifi-registry:0.6.0 | |
# https://github.com/michalklempa/docker-nifi-registry/blob/1cc1970b480c9568d1b5691359cac070ac51b257/docker-compose.github.yml | |
image: michalklempa/nifi-registry:0.6.0-default | |
container_name: registry | |
environment: | |
#DEBUG: 1 | |
FLOW_PROVIDER: git | |
#GIT_REMOTE_URL: [email protected]:michalklempa/docker-nifi-registry-example-flow.git | |
#GIT_CHECKOUT_BRANCH: example | |
FLOW_PROVIDER_GIT_FLOW_STORAGE_DIRECTORY: /opt/nifi-registry/flow-storage-git | |
#FLOW_PROVIDER_GIT_REMOTE_TO_PUSH: origin | |
#GIT_CONFIG_USER_NAME: 'Michal Klempa' | |
#GIT_CONFIG_USER_EMAIL: [email protected] | |
volumes: | |
- ./for_registry/registry/:/opt/registry:ro | |
- ./extensions:/opt/nifi/nifi-current/extensions | |
- ./flow_storage:/opt/nifi-registry/flow-storage-git | |
#- ./conf_nifi-registry/providers.xml:/opt/nifi-registry/nifi-registry-0.6.0/conf/providers.xml | |
ports: | |
- 18080:18080 |
Hopefully some replies here https://apachenifi.slack.com/archives/C0L9VCD47/p1591634722155500 or here ;)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How can I persist the state & especially configuration of my nifi flows outside a docker container? When trying to do so https://gist.github.com/geoHeil/42e213e8532623181cc5fbb65a30981c I fail to persist the configuration. - ./for_nifi/conf:/opt/nifi/nifi-current/conf when trying to map the conf directory like this - NiFi will no longer start up. I also noticed, that no changes of i.e. controller settings seem to be reflected in the conf directory. Hoever 1) my current flow and 2) any configuration clicked in the UI i.e. the link in the controller settings to the registry are lost when restarting the container.