mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-05-31 22:59:39 +02:00
update nifi
This commit is contained in:
parent
c91004dfd0
commit
f01034e362
@ -9,32 +9,29 @@ and distribute data.
|
||||
## up and running
|
||||
|
||||
```bash
|
||||
$ mkdir -p data/nifi/{conf,database_repository,flowfile_repository,content_repository,provenance_repository,state,logs}
|
||||
$ mkdir -p data/nifi/{conf,database_repository,flowfile_repository,content_repository,provenance_repository,state,logs,nar_extensions,python_extensions}
|
||||
$ mkdir -p data/registry/{database,flow_storage,logs}
|
||||
$ chown -R 1000:1000 data
|
||||
|
||||
$ vi docker-compose.yml
|
||||
volumes:
|
||||
- ./data/nifi/conf:/tmp
|
||||
# ./data/nifi/conf:/opt/nifi/nifi-current/conf
|
||||
|
||||
$ docker-compose run --rm --entrypoint bash nifi
|
||||
>>> cp /opt/nifi/nifi-current/conf/* /tmp
|
||||
>>> exit
|
||||
|
||||
$ vi docker-compose.yml
|
||||
volumes:
|
||||
# ./data/nifi/conf:/tmp
|
||||
- ./data/nifi/conf:/opt/nifi/nifi-current/conf
|
||||
$ tree data
|
||||
├── nifi
|
||||
│ ├── conf
|
||||
│ ├── content_repository
|
||||
│ ├── database_repository
|
||||
│ ├── flowfile_repository
|
||||
│ ├── logs
|
||||
│ ├── nar_extensions
|
||||
│ ├── provenance_repository
|
||||
│ ├── python_extensions
|
||||
│ └── state
|
||||
└── registry
|
||||
├── database
|
||||
├── flow_storage
|
||||
└── logs
|
||||
|
||||
$ docker-compose up -d
|
||||
$ curl http://127.0.0.1:8080/nifi/
|
||||
$ curl -k --resolve nifi:8443:127.0.0.1 https://nifi:8443/nifi/
|
||||
$ open https://nifi:8443/nifi/#/login
|
||||
$ curl http://127.0.0.1:18080/nifi-registry/
|
||||
```
|
||||
|
||||
Maybe there are better ways to populate a volume:
|
||||
|
||||
- named volumes
|
||||
- anonymous volumes
|
||||
|
||||
[1]: https://nifi.apache.org
|
||||
|
@ -7,15 +7,15 @@ services:
|
||||
init-nifi:
|
||||
image: apache/nifi:2.3.0
|
||||
entrypoint: ["bash", "-c"]
|
||||
command: "test -f /data/bootstrap.conf || cp /opt/nifi/nifi-current/conf/* /data"
|
||||
command: ["test -f /tmp/bootstrap.conf || cp -v /opt/nifi/nifi-current/conf/* /tmp"]
|
||||
volumes:
|
||||
- init-nifi-conf:/opt/nifi/nifi-current/conf
|
||||
- /opt/nifi/nifi-current/conf:/data
|
||||
- ./data/nifi/conf:/tmp
|
||||
|
||||
nifi:
|
||||
image: apache/nifi:2.3.0
|
||||
ports:
|
||||
- "8080:8080"
|
||||
- "8443:8443"
|
||||
volumes:
|
||||
- ./data/nifi/conf:/opt/nifi/nifi-current/conf
|
||||
- ./data/nifi/database_repository:/opt/nifi/nifi-current/database_repository
|
||||
@ -27,11 +27,12 @@ services:
|
||||
- ./data/nifi/state:/opt/nifi/nifi-current/state
|
||||
- ./data/nifi/logs:/opt/nifi/nifi-current/logs
|
||||
environment:
|
||||
- NIFI_WEB_HTTP_PORT=8080
|
||||
- NIFI_WEB_HTTPS_HOST=nifi
|
||||
- NIFI_WEB_HTTPS_PORT=8443
|
||||
- NIFI_JVM_HEAP_INIT=8g
|
||||
- NIFI_JVM_HEAP_MAX=16g
|
||||
- SINGLE_USER_CREDENTIALS_USERNAME=admin
|
||||
- SINGLE_USER_CREDENTIALS_PASSWORD=admin
|
||||
- SINGLE_USER_CREDENTIALS_PASSWORD=@hello@world@ # at least 12 characters
|
||||
depends_on:
|
||||
- init-nifi
|
||||
hostname: nifi
|
||||
@ -45,6 +46,8 @@ services:
|
||||
- ./data/registry/database:/opt/nifi-registry/nifi-registry-current/database
|
||||
- ./data/registry/flow_storage:/opt/nifi-registry/nifi-registry-current/flow_storage
|
||||
- ./data/registry/logs:/opt/nifi-registry/nifi-registry-current/logs
|
||||
environment:
|
||||
- NIFI_REGISTRY_WEB_HTTP_PORT=18080
|
||||
hostname: registry
|
||||
restart: unless-stopped
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user