version: "3.4"
services:
  validator:
    image: chainsafe/lodestar:next
    restart: always
    volumes:
      - validator:/data
      - logs:/logs
      - ./keystores:/keystores
    env_file: .env
    command: validator --dataDir /data --importKeystores /keystores --importKeystoresPassword /keystores/password.txt --server http://beacon_node:9596 --logFile /logs/validator.log --logFileLevel debug --logFileDailyRotate 5
    # A validator client requires very little memory. This limit allows to run the validator
    # along with the beacon_node in a 8GB machine and be safe on memory spikes.
    environment:
      NODE_OPTIONS: --max-old-space-size=2048

volumes:
  validator:
  logs:
