Member since
05-23-2020
3
Posts
0
Kudos Received
0
Solutions
10-14-2022
07:09 AM
Hey TF, I might be quite late for the party, but myself was recently working with NiFi and Traefik and was able to access the UI successfully after a lot of struggle. Please find the docker compose file I used to get my services up and running. version: "3.7"
services:
# configuration manager for NiFi
zookeeper:
hostname: myzookeeper
image: zookeeper:latest
restart: on-failure
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
networks:
- apache-nifi-internal
deploy:
restart_policy:
condition: any
delay: 5s
max_attempts: 3
window: 120s
nifi:
user: root
hostname: mynifi
image: apache/nifi:latest
restart: on-failure
environment:
- NIFI_WEB_HTTP_PORT=8443
- NIFI_WEB_HTTP_HOST=0.0.0.0
- NIFI_WEB_PROXY_CONTEXT_PATH=/
volumes:
- nifi_database_repository:/opt/nifi/nifi-current/database_repository
- nifi_flowfile_repository:/opt/nifi/nifi-current/flowfile_repository
- nifi_content_repository:/opt/nifi/nifi-current/content_repository
- nifi_provenance_repository:/opt/nifi/nifi-current/provenance_repository
- nifi_state:/opt/nifi/nifi-current/state
- nifi_logs:/opt/nifi/nifi-current/logs
- nifi_conf:/opt/nifi/nifi-current/conf
networks:
- apache-nifi-internal
- traefik_proxy
deploy:
labels:
# traefik
- traefik.enable=true
# service
- traefik.http.services.nifi-flow.loadbalancer.server.port=8443
# Routers
- traefik.http.routers.nifi-flow.service=nifi-flow
- traefik.http.routers.nifi-flow.entrypoints=$TRAEFIK_HTTPS_ENTRYPOINT
- traefik.http.routers.nifi-flow.tls=true
- traefik.http.routers.nifi-flow.rule=Host(`$DOCKER_HOST_URL`) && PathPrefix(`/nifi`)
restart_policy:
condition: any
delay: 120s
max_attempts: 3
window: 60s
networks:
traefik_proxy:
external: true
name: traefik_webgateway
apache-nifi-internal:
volumes:
nifi_conf: {external: true}
nifi_database_repository: {external: true}
nifi_flowfile_repository: {external: true}
nifi_content_repository: {external: true}
nifi_provenance_repository: {external: true}
nifi_state: {external: true}
nifi_logs: {external: true} I am currently trying to make the NiFi instance secure and moving to HTTPS the above code will deploy the NiFi on unsecure mode that is HTTP.
... View more