Skip to content

Instantly share code, notes, and snippets.

@Craigson
Created February 19, 2021 00:29
Show Gist options
  • Save Craigson/e7de81fa1f09af1217016eab151f099c to your computer and use it in GitHub Desktop.
Save Craigson/e7de81fa1f09af1217016eab151f099c to your computer and use it in GitHub Desktop.
launch_validator role for running the Validator docker container
---
- name: Create data directory if it doesn't exist
command: mkdir -p ./polkadot/.local
- name: Create data directory if it doesn't exist
command: mkdir -p ./data
- name: Launch Polkadot validator
docker_container:
image: parity/polkadot:latest
name: polkadot-validator
purge_networks: true
command:
- "--validator"
- "--name={{validator_node_name}}"
- "--prometheus-port=9615"
- "--prometheus-external"
volumes:
- "./data:/data"
- "./polkadot:/polkadot"
ports:
- "30333:30333"
exposed_ports:
- "9615"
- "9933"
networks:
- name: "{{network_name}}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment