Configuration with Docker

Table of Contents

How to configure Lisk Service.

Show current configuration

To show the current configuration of Lisk Service, execute the following command:

make print-config
Result for the default config, which will connect Lisk Service to the Lisk Mainnet
networks:
  core_network: {}
  services_network: {}
services:
  core:
    depends_on:
      mysql_core:
        condition: service_started
      redis_common:
        condition: service_started
      redis_core:
        condition: service_started
    environment:
      ENABLE_FEE_ESTIMATOR_FULL: "false"
      ENABLE_FEE_ESTIMATOR_QUICK: "true"
      ENABLE_JOB_MISSING_BLOCKS: "true"
      ENABLE_TRANSACTION_STATS: "true"
      FEE_EST_DEFAULT_START_BLOCK_HEIGHT: ''
      GENESIS_BLOCK_URL: ''
      GENESIS_HEIGHT: ''
      GEOIP_JSON: https://geoip.lisk.io/json
      INDEX_MISSING_BLOCKS_RANGE: '1080'
      INDEX_N_BLOCKS: '0'
      LISK_CORE_HTTP: ''
      LISK_CORE_WS: ''
      LISK_STATIC: https://static-data.lisk.io
      SERVICE_BROKER: redis://redis_common:6379/0
      SERVICE_CORE_MYSQL: mysql://lisk:password@mysql_core:3306/lisk
      SERVICE_CORE_REDIS: redis://redis_core:6379/0
      SERVICE_LOG_CONSOLE: "false"
      SERVICE_LOG_FILE: "false"
      SERVICE_LOG_GELF: "false"
      SERVICE_LOG_LEVEL: debug
      SERVICE_LOG_STDOUT: "true"
      TRANSACTION_STATS_HISTORY_LENGTH_DAYS: ''
    extra_hosts:
      host.docker.internal: host-gateway
    image: lisk/service_core
    networks:
      core_network: {}
      services_network: {}
    restart: always
  gateway:
    depends_on:
      core:
        condition: service_started
    environment:
      ENABLE_HTTP_API: ''
      ENABLE_HTTP_CACHE_CONTROL: "false"
      ENABLE_WS_API: ''
      HOST: 0.0.0.0
      HTTP_CACHE_CONTROL_DIRECTIVES: public,max-age=10
      PORT: '9901'
      SERVICE_BROKER: redis://redis_common:6379/0
      SERVICE_LOG_CONSOLE: "false"
      SERVICE_LOG_FILE: "false"
      SERVICE_LOG_GELF: "false"
      SERVICE_LOG_LEVEL: debug
      SERVICE_LOG_STDOUT: "true"
    healthcheck:
      test: curl --fail http://gateway:9901/api/v1/transactions
    image: lisk/service_gateway
    networks:
      services_network: {}
    ports:
    - 127.0.0.1:9901:9901/tcp
    restart: always
  market:
    depends_on:
      redis_common:
        condition: service_started
      redis_market:
        condition: service_started
    environment:
      SERVICE_BROKER: redis://redis_common:6379/0
      SERVICE_LOG_CONSOLE: "false"
      SERVICE_LOG_FILE: "false"
      SERVICE_LOG_GELF: "false"
      SERVICE_LOG_LEVEL: debug
      SERVICE_LOG_STDOUT: "true"
      SERVICE_MARKET_REDIS: redis://redis_market:6379/0
    image: lisk/service_market
    networks:
      services_network: {}
    restart: always
  mysql_core:
    environment:
      MYSQL_DATABASE: lisk
      MYSQL_PASSWORD: password
      MYSQL_ROOT_PASSWORD: password
      MYSQL_USER: lisk
    healthcheck:
      retries: 10
      test:
      - CMD
      - mysqladmin
      - ping
      - -h
      - localhost
      timeout: 20s
    image: mysql:5.7
    networks:
      core_network: {}
    restart: always
    volumes:
    - mysql-data:/var/lib/mysql:rw
  redis_common:
    command: redis-server /etc/redis/redis.conf
    healthcheck:
      test: redis-cli ping
    image: redis:5-alpine
    networks:
      services_network: {}
    restart: always
    volumes:
    - /home/michal/lisk-service/docker/redis/redis.volatile.conf:/etc/redis/redis.conf:ro
  redis_core:
    command: redis-server /etc/redis/redis.conf
    healthcheck:
      test: redis-cli ping
    image: redis:5-alpine
    networks:
      core_network: {}
    restart: always
    volumes:
    - /home/michal/lisk-service/docker/redis/redis.persistent.conf:/etc/redis/redis.conf:ro
  redis_market:
    command: redis-server /etc/redis/redis.conf
    healthcheck:
      test: redis-cli ping
    image: redis:5-alpine
    networks:
      services_network: {}
    restart: always
    volumes:
    - /home/michal/lisk-service/docker/redis/redis.persistent.conf:/etc/redis/redis.conf:ro
version: '3'
volumes:
  mysql-data: {}