docker-compose.yml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. version: "3"
  2. services:
  3. genesis:
  4. image: bsc-genesis
  5. env_file: .env
  6. environment:
  7. INIT_HOLDER_BALANCE: "500000000000000000000"
  8. NUMS_OF_VALIDATOR: 1
  9. volumes:
  10. - ./storage:/root/storage
  11. - ./scripts:/root/scripts
  12. - ./config:/root/config
  13. - ./init-holders:/root/init-holders
  14. command: /root/scripts/bootstrap.sh
  15. bsc-rpc:
  16. image: bsc
  17. healthcheck:
  18. test: nc -z localhost 8545
  19. interval: 3s
  20. timeout: 5s
  21. retries: 15
  22. env_file: .env
  23. environment:
  24. NODE_ID: bsc-rpc
  25. volumes:
  26. - ./storage/bsc-rpc:/root/.ethereum
  27. - ./scripts:/scripts
  28. - ./config:/config
  29. entrypoint: [ "sh", "-c", "/scripts/bsc-rpc.sh" ]
  30. bsc-validator1:
  31. image: bsc
  32. env_file: .env
  33. environment:
  34. NODE_ID: bsc-validator1
  35. BOOTSTRAP_HOST: bsc-rpc
  36. volumes:
  37. - ./storage/bsc-validator1:/root/.ethereum
  38. - ./scripts:/scripts
  39. entrypoint: [ "sh", "-c", "/scripts/bsc-validator.sh" ]
  40. truffle-test:
  41. image: truffle-test
  42. command: /scripts/truffle-test.sh
  43. env_file: .env
  44. environment:
  45. RPC_HOST: bsc-rpc
  46. RPC_PORT: 8545
  47. volumes:
  48. - ./scripts:/scripts
  49. depends_on:
  50. bsc-rpc:
  51. condition: service_healthy
  52. networks:
  53. default:
  54. ipam:
  55. driver: default
  56. config:
  57. - subnet: 99.1.0.0/16