Skip to content

Instantly share code, notes, and snippets.

@rosstimson
Last active December 21, 2017 16:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rosstimson/bc0e4bc881e2c333b5bcfdbade720d3d to your computer and use it in GitHub Desktop.
Save rosstimson/bc0e4bc881e2c333b5bcfdbade720d3d to your computer and use it in GitHub Desktop.
Docker Compose file for deploying an IOTA full node with IRI, Nelson, plus some monitoring tools.
[nelson]
cycleInterval = 60
epochInterval = 300
apiPort = 18600
apiHostname = 127.0.0.1
port = 16600
IRIHostname = iri
IRIPort = 14265
TCPPort = 15777
UDPPort = 14777
dataPath = data/neighbors.db
isMaster = false
silent = false
gui = false
; add as many initial nelson neighbors, as you like
neighbors[] = mainnet.deviota.com/16600
neighbors[] = mainnet2.deviota.com/16600
neighbors[] = mainnet3.deviota.com/16600
neighbors[] = iotairi.tt-tec.net/16600
version: '3'
services:
iri:
image: iotaledger/iri
# Override default CMD to remove the API restrictions such as addNeighbors.
command: /usr/bin/java -XX:+DisableAttachMechanism -Xmx8g -Xms256m -Dlogback.configurationFile=/iri/conf/logback.xml -Djava.net.preferIPv4Stack=true -jar iri.jar -p 14265 -u 14777 -t 15777 --remote
volumes:
# Give a proper location on host server such as:
# /var/lib/iri/mainnetdb:/iri/mainnetdb
- ./iri/mainnetdb:/iri/mainnetdb:rw
ports:
# Port 14265 is the IRI API, it is already exposed and accessible
# to Nelson via Docker networking, only uncomment here if you also
# want to expose the IRI API to the host machine, this could be a
# possible security risk if you do not secure it somehow.
#
# - 14265:14265
- 14777:14777/udp
- 15777:15777
nelson:
image: romansemko/nelson.cli:0.2.2-beta
ports:
- 18600:18600
depends_on:
- iri
volumes:
# Give these proper locations on the host system such as:
# /etc/nelson/config.ini:/config.ini
# /var/lib/nelson/:/data
- ./config.ini:/config.ini:ro
- ./data:/data:rw
command: ["/usr/local/bin/nelson", "--config", "/config.ini"]
# This service doesn't work yet as need to be able to configure
# nelson.cli host.
#
# nelson-mon:
# image: rosstimson/nelson-mon
# ports:
# - 3000:3000
# depends_on:
# - nelson
ipm:
image: rosstimson/ipm
ports:
- 8888:8888
environment:
- API_PORT=14265
- REFRESH=10s
- IOTA_HOST=iri
depends_on:
- iri
@rosstimson
Copy link
Author

The rosstimson/ipm image has been built with: akashgoswami/ipm#42

FROM node:8-alpine

COPY . /usr/src/ipm
WORKDIR /usr/src/ipm
RUN npm install -g .

ENV IOTA_HOST iri
ENV API_PORT 14265
ENV REFRESH 10s

EXPOSE 8888

RUN adduser -D -S -s /bin/false -u 1001 ipm
USER ipm
VOLUME /home/ipm/

CMD iota-pm -i http://$IOTA_HOST:$API_PORT -p 0.0.0.0:8888 -r $REFRESH

@pascalandy
Copy link

Please let me know when it's ready to test :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment