Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
version: '3.7'
services:
# COMMENT FOR YOUR DOCKER SWARM
# for this to work:
# constraints you need to register a label for each computer in the swarm.
# you need to have initialized a swarm https://docs.docker.com/engine/reference/commandline/swarm_init/ and made workers join it
# then you need to label the manager and the workers with docker node update --label-add comp=yourcomputertodeploy id_of_your_node
# you need to set CNODEIP with your public ip.
# you need to set published port to ports you have open on the local computer your deploying too and router/internet of that computer
# you need to have a local volume with the 3 config files nodeconfig.yaml, genesis.json and topology.json
xxnameofyourfirstnode:
image: eysteinh/cnode:1.11.0
deploy:
placement:
constraints:
- node.labels.comp==yourcomputertodeploy
replicas: 1
restart_policy:
condition: any
volumes:
- yourlocalconfigfolder for node 1:/srv/cardano/cardano-node/config
tty: true
stdin_open: true
environment:
- CNODEIPV4=xx.xx.xx.xx
ports:
- target: 3000
published: xxxx
protocol: tcp
mode: host
xxnameofsecondnode:
image: eysteinh/cnode:1.11.0
deploy:
placement:
constraints:
- node.labels.comp==yourcomputertodeploy
replicas: 1
restart_policy:
condition: any
volumes:
- yourlocalconfigfolder for node 2:/srv/cardano/cardano-node/config
tty: true
stdin_open: true
environment:
- CNODEIPV4=xx.xx.xx.xx
ports:
- target: 3000
published: xxxx
protocol: tcp
mode: host
xxnameofyourthirdnode:
image: eysteinh/cnode:1.11.0
deploy:
placement:
constraints:
- node.labels.comp==yourcomputertodeploy
replicas: 1
restart_policy:
condition: any
volumes:
- your local config folder for node 3:/srv/cardano/cardano-node/config
tty: true
stdin_open: true
environment:
- CNODEIPV4=xx.xx.xx.xx
ports:
- target: 3000
published: xxxx
protocol: tcp
mode: host
xxnameofyourfourthnode:
image: eysteinh/cnode:1.11.0
deploy:
placement:
constraints:
- node.labels.comp==yourcomputertodeploy
replicas: 1
restart_policy:
condition: any
volumes:
- your local config folder for node 4:/srv/cardano/cardano-node/config
tty: true
stdin_open: true
environment:
- CNODEIPV4=xx.xx.xx.xx
ports:
- target: 3000
published: xxxx
protocol: tcp
mode: host
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.