Skip to content

Commit

Permalink
Workaround for docker/compose#2312
Browse files Browse the repository at this point in the history
  • Loading branch information
aperepel committed Nov 17, 2015
1 parent ade7089 commit 5fb0573
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
6 changes: 5 additions & 1 deletion nifi/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ acquisition:
net: nifi
environment:
NIFI_UI_BANNER_TEXT: 'Acquisition Node'
# have to fix the container name until
# https://github.com/docker/compose/issues/2312 is addressed
container_name: acquisition

processing:
processing-1:
# image: aperepel/nifi
build: .
ports:
- 9091:8080
net: nifi
environment:
NIFI_UI_BANNER_TEXT: 'Processing Node'
container_name: processing-1
13 changes: 11 additions & 2 deletions nifi/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ splash() {
echo "NIFI_UI_BANNER_TEXT=$NIFI_UI_BANNER_TEXT"
}

configure() {
configure_common() {
sed -i 's/\.\/flowfile_repository/\/flowrepo/g' $NIFI_HOME/conf/nifi.properties
sed -i 's/\.\/content_repository/\/contentrepo/g' $NIFI_HOME/conf/nifi.properties
sed -i 's/\.\/conf\/flow\.xml\.gz/\/flowconf\/flow.xml.gz/' $NIFI_HOME/conf/nifi.properties
Expand All @@ -16,8 +16,17 @@ configure() {
sed -i "s/nifi\.ui\.banner\.text=/nifi.ui.banner.text=${NIFI_UI_BANNER_TEXT}/g" $NIFI_HOME/conf/nifi.properties
}

configure_site2site() {
sed -i "s/nifi\.remote\.input\.socket\.host=/nifi.remote.input.socket.host=${HOSTNAME}/g" $NIFI_HOME/conf/nifi.properties
sed -i "s/nifi\.remote\.input\.socket\.port=/nifi.remote.input.socket.port=12345/g" $NIFI_HOME/conf/nifi.properties
# unsecure for now so we don't complicate the setup with certificates
sed -i "s/nifi\.remote\.input\.secure=true/nifi.remote.input.secure=false/g" $NIFI_HOME/conf/nifi.properties
}

splash
configure
configure_common

configure_site2site

# must be an exec so NiFi process replaces this script and receives signals
exec ./nifi.sh run

0 comments on commit 5fb0573

Please sign in to comment.