|
| 1 | +# Verified Mithril Signer node running on top of its own Cardano node |
| 2 | + |
| 3 | +version: "3.9" |
| 4 | + |
| 5 | +services: |
| 6 | + cardano-node-signer-relay: |
| 7 | + image: cardano-node/${CARDANO_IMAGE_ID}-modified |
| 8 | + container_name: cardano-node-relay-signer-${SIGNER_ID} |
| 9 | + restart: always |
| 10 | + build: |
| 11 | + context: . |
| 12 | + dockerfile: Dockerfile.cardano |
| 13 | + args: |
| 14 | + CARDANO_IMAGE_ID: ${CARDANO_IMAGE_ID} |
| 15 | + user: ${CURRENT_UID} |
| 16 | + profiles: |
| 17 | + - cardano |
| 18 | + - all |
| 19 | + logging: |
| 20 | + driver: "${LOGGING_DRIVER}" |
| 21 | + volumes: |
| 22 | + - ./cardano-configurations/network/${NETWORK}:/config |
| 23 | + - ../data/${NETWORK}/mithril-signer-${SIGNER_ID}/cardano/db/relay:/db |
| 24 | + - ../data/${NETWORK}/mithril-signer-${SIGNER_ID}/cardano/ipc:/ipc |
| 25 | + - ../data/${NETWORK}/mithril-signer-${SIGNER_ID}/cardano/pool:/pool |
| 26 | + - ../data/${NETWORK}/mithril-signer-${SIGNER_ID}/cardano/www:/www |
| 27 | + ports: |
| 28 | + - "${SIGNER_CARDANO_RELAY_PORT}:${SIGNER_CARDANO_RELAY_PORT}" |
| 29 | + environment: |
| 30 | + - CARDANO_SOCKET_PATH=/ipc/node.socket |
| 31 | + - CARDANO_NODE_SOCKET_PATH=/ipc/node.socket |
| 32 | + command: |
| 33 | + [ |
| 34 | + "run", |
| 35 | + "--config", |
| 36 | + "/config/cardano-node/config.json", |
| 37 | + "--topology", |
| 38 | + "/pool/topology-relay.json", |
| 39 | + "--database-path", |
| 40 | + "/db", |
| 41 | + "--port", |
| 42 | + "${SIGNER_CARDANO_RELAY_PORT}" |
| 43 | + ] |
| 44 | + |
| 45 | + cardano-node-signer-block-producer: |
| 46 | + image: cardano-node/${CARDANO_IMAGE_ID}-modified |
| 47 | + container_name: cardano-node-block-producer-signer-${SIGNER_ID} |
| 48 | + restart: always |
| 49 | + build: |
| 50 | + context: . |
| 51 | + dockerfile: Dockerfile.cardano |
| 52 | + args: |
| 53 | + CARDANO_IMAGE_ID: ${CARDANO_IMAGE_ID} |
| 54 | + user: ${CURRENT_UID} |
| 55 | + profiles: |
| 56 | + - cardano |
| 57 | + - all |
| 58 | + logging: |
| 59 | + driver: "${LOGGING_DRIVER}" |
| 60 | + volumes: |
| 61 | + - ./cardano-configurations/network/${NETWORK}:/config |
| 62 | + - ../data/${NETWORK}/mithril-signer-${SIGNER_ID}/cardano/db/block-producer:/db |
| 63 | + - ../data/${NETWORK}/mithril-signer-${SIGNER_ID}/cardano/ipc:/ipc |
| 64 | + - ../data/${NETWORK}/mithril-signer-${SIGNER_ID}/cardano/pool:/pool |
| 65 | + - ../data/${NETWORK}/mithril-signer-${SIGNER_ID}/cardano/www:/www |
| 66 | + ports: |
| 67 | + - "${SIGNER_CARDANO_BLOCK_PRODUCER_PORT}:${SIGNER_CARDANO_BLOCK_PRODUCER_PORT}" |
| 68 | + environment: |
| 69 | + - CARDANO_SOCKET_PATH=/ipc/node.socket |
| 70 | + - CARDANO_NODE_SOCKET_PATH=/ipc/node.socket |
| 71 | + command: |
| 72 | + [ |
| 73 | + "run", |
| 74 | + "--config", |
| 75 | + "/config/cardano-node/config.json", |
| 76 | + "--topology", |
| 77 | + "/pool/topology-block-producer.json", |
| 78 | + "--database-path", |
| 79 | + "/db", |
| 80 | + "--port", |
| 81 | + "${SIGNER_CARDANO_BLOCK_PRODUCER_PORT}", |
| 82 | + "--shelley-kes-key", |
| 83 | + "/pool/kes.skey", |
| 84 | + "--shelley-vrf-key", |
| 85 | + "/pool/vrf.skey", |
| 86 | + "--shelley-operational-certificate", |
| 87 | + "/pool/opcert.cert" |
| 88 | + ] |
| 89 | + |
| 90 | + mithril-signer: |
| 91 | + image: ghcr.io/input-output-hk/mithril-signer:${MITHRIL_IMAGE_ID} |
| 92 | + container_name: mithril-signer-${SIGNER_ID} |
| 93 | + restart: always |
| 94 | + user: ${CURRENT_UID} |
| 95 | + profiles: |
| 96 | + - mithril |
| 97 | + - all |
| 98 | + environment: |
| 99 | + - RUST_BACKTRACE=1 |
| 100 | + - AGGREGATOR_ENDPOINT=http://${AGGREGATOR_CREDENTIALS}mithril-aggregator:8080/aggregator |
| 101 | + - NETWORK=${NETWORK} |
| 102 | + - KES_SECRET_KEY_PATH=/mithril-signer-${SIGNER_ID}/cardano/pool/kes.skey |
| 103 | + - OPERATIONAL_CERTIFICATE_PATH=/mithril-signer-${SIGNER_ID}/cardano/pool/opcert.cert |
| 104 | + - RUN_INTERVAL=120000 |
| 105 | + - DB_DIRECTORY=/mithril-signer-${SIGNER_ID}/cardano/db |
| 106 | + - DATA_STORES_DIRECTORY=/mithril-signer-${SIGNER_ID}/mithril/stores |
| 107 | + - STORE_RETENTION_LIMIT=5 |
| 108 | + - CARDANO_NODE_SOCKET_PATH=/ipc/node.socket |
| 109 | + - CARDANO_CLI_PATH=/app/bin/cardano-cli |
| 110 | + - ERA_READER_ADAPTER_TYPE=${ERA_READER_ADAPTER_TYPE} |
| 111 | + - ERA_READER_ADAPTER_PARAMS=${ERA_READER_ADAPTER_PARAMS} |
| 112 | + volumes: |
| 113 | + - ../data/${NETWORK}/mithril-signer-${SIGNER_ID}/mithril:/mithril-signer-${SIGNER_ID}/mithril |
| 114 | + - ../data/${NETWORK}/mithril-signer-${SIGNER_ID}/cardano/db/block-producer:/mithril-signer-${SIGNER_ID}/cardano/db |
| 115 | + - ../data/${NETWORK}/mithril-signer-${SIGNER_ID}/cardano/pool:/mithril-signer-${SIGNER_ID}/cardano/pool |
| 116 | + - ../data/${NETWORK}/mithril-signer-${SIGNER_ID}/cardano/ipc:/ipc |
| 117 | + - ./cardano-configurations/network/${NETWORK}:/config |
| 118 | + depends_on: |
| 119 | + cardano-node-signer-block-producer: |
| 120 | + condition: service_started |
| 121 | + cardano-node-signer-relay: |
| 122 | + condition: service_started |
| 123 | + logging: |
| 124 | + driver: "${LOGGING_DRIVER}" |
| 125 | + |
| 126 | + mithril-signer-www: |
| 127 | + image: nginx:latest |
| 128 | + container_name: mithril-signer-www-${SIGNER_ID} |
| 129 | + restart: always |
| 130 | + profiles: |
| 131 | + - mithril |
| 132 | + - all |
| 133 | + volumes: |
| 134 | + - ../data/${NETWORK}/mithril-signer-${SIGNER_ID}/cardano/www:/usr/share/nginx/html |
| 135 | + ports: |
| 136 | + - "${SIGNER_WWW_PORT}:8080" |
| 137 | + logging: |
| 138 | + driver: "${LOGGING_DRIVER}" |
| 139 | + labels: |
| 140 | + - 'traefik.enable=true' |
| 141 | + - 'traefik.http.routers.mithril-signer-${SIGNER_ID}.rule=Host(`${SIGNER_HOST}`)' |
| 142 | + - 'traefik.http.routers.mithril-signer-${SIGNER_ID}.tls=true' |
| 143 | + - 'traefik.http.routers.mithril-signer-${SIGNER_ID}.tls.certresolver=lets-encrypt' |
| 144 | + |
| 145 | +networks: |
| 146 | + default: |
| 147 | + external: |
| 148 | + name: mithril_network |
0 commit comments