docker-compose.yaml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. version: '3.8'
  2. services:
  3. # CDK Mint service
  4. prometheus:
  5. image: prom/prometheus:latest
  6. ports:
  7. - "9090:9090"
  8. volumes:
  9. - ./misc/provisioning/prometheus.yml:/etc/prometheus/prometheus.yml:ro
  10. command:
  11. - '--config.file=/etc/prometheus/prometheus.yml'
  12. - '--storage.tsdb.path=/prometheus'
  13. - '--web.console.libraries=/etc/prometheus/console_libraries'
  14. - '--web.console.templates=/etc/prometheus/consoles'
  15. - '--web.enable-lifecycle'
  16. - '--enable-feature=otlp-write-receiver'
  17. extra_hosts:
  18. - "host.docker.internal:host-gateway"
  19. networks:
  20. - cdk
  21. # Grafana for visualization
  22. grafana:
  23. image: grafana/grafana:latest
  24. ports:
  25. - "3011:3000"
  26. volumes:
  27. - ./misc/provisioning/datasources:/etc/grafana/provisioning/datasources
  28. - ./misc/provisioning/dashboards:/etc/grafana/provisioning/dashboards
  29. environment:
  30. - GF_DASHBOARDS_JSON_ENABLED=true
  31. - GF_SECURITY_ADMIN_PASSWORD=admin
  32. - GF_PROVISIONING_PATHS=/etc/grafana/provisioning
  33. networks:
  34. - cdk
  35. mintd:
  36. build:
  37. context: .
  38. dockerfile: Dockerfile
  39. container_name: mint
  40. ports:
  41. - "8085:8085"
  42. environment:
  43. - CDK_MINTD_URL=https://example.com
  44. - CDK_MINTD_LN_BACKEND=fakewallet
  45. - CDK_MINTD_LISTEN_HOST=0.0.0.0
  46. - CDK_MINTD_LISTEN_PORT=8085
  47. - CDK_MINTD_MNEMONIC=
  48. # Database configuration - choose one:
  49. # Option 1: SQLite (embedded, no additional setup needed)
  50. - CDK_MINTD_DATABASE=sqlite
  51. # Option 2: ReDB (embedded, no additional setup needed)
  52. # - CDK_MINTD_DATABASE=redb
  53. # Option 3: PostgreSQL (requires postgres service, enable with: docker-compose --profile postgres up)
  54. # - CDK_MINTD_DATABASE=postgres
  55. # - CDK_MINTD_DATABASE_URL=postgresql://cdk_user:cdk_password@postgres:5432/cdk_mint
  56. # Cache configuration
  57. - CDK_MINTD_CACHE_BACKEND=memory
  58. # For Redis cache (requires redis service, enable with: docker-compose --profile redis up):
  59. # - CDK_MINTD_CACHE_REDIS_URL=redis://redis:6379
  60. # - CDK_MINTD_CACHE_REDIS_KEY_PREFIX=cdk-mintd
  61. - CDK_MINTD_PROMETHEUS_ENABLED=true
  62. - CDK_MINTD_PROMETHEUS_ADDRESS=0.0.0.0
  63. - CDK_MINTD_PROMETHEUS_PORT=9000
  64. command: ["cdk-mintd"]
  65. depends_on:
  66. - prometheus
  67. - grafana
  68. networks:
  69. - cdk
  70. # Uncomment when using PostgreSQL:
  71. # depends_on:
  72. # - postgres
  73. # PostgreSQL database service
  74. # Enable with: docker-compose --profile postgres up
  75. # postgres:
  76. # image: postgres:16-alpine
  77. # container_name: mint_postgres
  78. # restart: unless-stopped
  79. # profiles:
  80. # - postgres
  81. # environment:
  82. # - POSTGRES_USER=cdk_user
  83. # - POSTGRES_PASSWORD=cdk_password
  84. # - POSTGRES_DB=cdk_mint
  85. # - POSTGRES_INITDB_ARGS=--encoding=UTF-8 --lc-collate=C --lc-ctype=C
  86. # ports:
  87. # - "5432:5432"
  88. # volumes:
  89. # - postgres_data:/var/lib/postgresql/data
  90. # healthcheck:
  91. # test: ["CMD-SHELL", "pg_isready -U cdk_user -d cdk_mint"]
  92. # interval: 10s
  93. # timeout: 5s
  94. # retries: 5
  95. # Redis cache service (optional)
  96. # Enable with: docker-compose --profile redis up
  97. # redis:
  98. # image: redis:7-alpine
  99. # container_name: mint_redis
  100. # restart: unless-stopped
  101. # profiles:
  102. # - redis
  103. # ports:
  104. # - "6379:6379"
  105. # volumes:
  106. # - redis_data:/data
  107. # command: redis-server --save 60 1 --loglevel warning
  108. # healthcheck:
  109. # test: ["CMD", "redis-cli", "ping"]
  110. # interval: 10s
  111. # timeout: 3s
  112. # retries: 5
  113. volumes:
  114. postgres_data:
  115. driver: local
  116. # redis_data:
  117. # driver: local
  118. networks:
  119. cdk:
  120. driver: bridge