compose.yaml 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. ---
  2. name: "Wazuh"
  3. description: "A security monitoring platform"
  4. version: "0.0.1"
  5. date: "2023-10-01"
  6. author: "Christian Lempa"
  7. tags:
  8. - wazuh
  9. - security
  10. - monitoring
  11. ---
  12. services:
  13. wazuh.manager:
  14. image: docker.io/wazuh/wazuh-manager:4.12.0
  15. container_name: wazuh-prod-1-manager
  16. hostname: wazuh.manager
  17. ulimits:
  18. memlock:
  19. soft: -1
  20. hard: -1
  21. nofile:
  22. soft: 655360
  23. hard: 655360
  24. ports:
  25. - "1514:1514"
  26. - "1515:1515"
  27. - "514:514/udp"
  28. - "55000:55000"
  29. environment:
  30. - INDEXER_URL=https://wazuh.indexer:9200
  31. - INDEXER_USERNAME=${INDEXER_USERNAME:?error}
  32. - INDEXER_PASSWORD=${INDEXER_PASSWORD:?error}
  33. - FILEBEAT_SSL_VERIFICATION_MODE=full
  34. - SSL_CERTIFICATE_AUTHORITIES=/etc/ssl/root-ca.pem
  35. - SSL_CERTIFICATE=/etc/ssl/filebeat.pem
  36. - SSL_KEY=/etc/ssl/filebeat.key
  37. - API_USERNAME=${API_USERNAME:?error}
  38. - API_PASSWORD=${API_PASSWORD:?error}
  39. volumes:
  40. - wazuh_api_configuration:/var/ossec/api/configuration
  41. - wazuh_etc:/var/ossec/etc
  42. - wazuh_logs:/var/ossec/logs
  43. - wazuh_queue:/var/ossec/queue
  44. - wazuh_var_multigroups:/var/ossec/var/multigroups
  45. - wazuh_integrations:/var/ossec/integrations
  46. - wazuh_active_response:/var/ossec/active-response/bin
  47. - wazuh_agentless:/var/ossec/agentless
  48. - wazuh_wodles:/var/ossec/wodles
  49. - filebeat_etc:/etc/filebeat
  50. - filebeat_var:/var/lib/filebeat
  51. - ./config/wazuh_indexer_ssl_certs/root-ca-manager.pem:/etc/ssl/root-ca.pem
  52. - ./config/wazuh_indexer_ssl_certs/wazuh.manager.pem:/etc/ssl/filebeat.pem
  53. - ./config/wazuh_indexer_ssl_certs/wazuh.manager-key.pem:/etc/ssl/filebeat.key
  54. - ./config/wazuh_cluster/wazuh_manager.conf:/wazuh-config-mount/etc/ossec.conf
  55. # --> (Optional) For custom rules
  56. # - ./config/rules/local_rules.xml:/var/ossec/etc/rules/local_rules.xml:ro
  57. # <--
  58. # --> (Optional) When using traefik
  59. # networks:
  60. # - frontend
  61. # <--
  62. # --> (Optional) When using a separate backend network
  63. # - backend
  64. # <--
  65. restart: unless-stopped
  66. wazuh.indexer:
  67. image: docker.io/wazuh/wazuh-indexer:4.12.0
  68. container_name: wazuh-prod-1-indexer
  69. hostname: wazuh.indexer
  70. ports:
  71. - "9200:9200"
  72. environment:
  73. - "OPENSEARCH_JAVA_OPTS=-Xms1g -Xmx1g"
  74. ulimits:
  75. memlock:
  76. soft: -1
  77. hard: -1
  78. nofile:
  79. soft: 65536
  80. hard: 65536
  81. volumes:
  82. - wazuh-indexer-data:/var/lib/wazuh-indexer
  83. - ./config/wazuh_indexer_ssl_certs/root-ca.pem:/usr/share/wazuh-indexer/certs/root-ca.pem
  84. - ./config/wazuh_indexer_ssl_certs/wazuh.indexer-key.pem:/usr/share/wazuh-indexer/certs/wazuh.indexer.key
  85. - ./config/wazuh_indexer_ssl_certs/wazuh.indexer.pem:/usr/share/wazuh-indexer/certs/wazuh.indexer.pem
  86. - ./config/wazuh_indexer_ssl_certs/admin.pem:/usr/share/wazuh-indexer/certs/admin.pem
  87. - ./config/wazuh_indexer_ssl_certs/admin-key.pem:/usr/share/wazuh-indexer/certs/admin-key.pem
  88. - ./config/wazuh_indexer/wazuh.indexer.yml:/usr/share/wazuh-indexer/opensearch.yml
  89. - ./config/wazuh_indexer/internal_users.yml:/usr/share/wazuh-indexer/opensearch-security/internal_users.yml
  90. # --> (Optional) When using traefik
  91. # networks:
  92. # - frontend
  93. # <--
  94. # --> (Optional) When using a separate backend network
  95. # - backend
  96. # <--
  97. restart: unless-stopped
  98. wazuh.dashboard:
  99. image: docker.io/wazuh/wazuh-dashboard:4.12.0
  100. container_name: wazuh-prod-1-dashboard
  101. hostname: wazuh.dashboard
  102. # --> (Optional) Remove the port mapping when using traefik
  103. ports:
  104. - 4443:5601
  105. # <--
  106. environment:
  107. - INDEXER_USERNAME=${INDEXER_USERNAME:?error}
  108. - INDEXER_PASSWORD=${INDEXER_PASSWORD:?error}
  109. - WAZUH_API_URL=https://wazuh.manager
  110. - DASHBOARD_USERNAME=${DASHBOARD_USERNAME:?error}
  111. - DASHBOARD_PASSWORD=${DASHBOARD_PASSWORD:?error}
  112. - API_USERNAME=${API_USERNAME:?error}
  113. - API_PASSWORD=${API_PASSWORD:?error}
  114. volumes:
  115. - ./config/wazuh_indexer_ssl_certs/wazuh.dashboard.pem:/usr/share/wazuh-dashboard/certs/wazuh-dashboard.pem
  116. - ./config/wazuh_indexer_ssl_certs/wazuh.dashboard-key.pem:/usr/share/wazuh-dashboard/certs/wazuh-dashboard-key.pem
  117. - ./config/wazuh_indexer_ssl_certs/root-ca.pem:/usr/share/wazuh-dashboard/certs/root-ca.pem
  118. - ./config/wazuh_dashboard/opensearch_dashboards.yml:/usr/share/wazuh-dashboard/config/opensearch_dashboards.yml
  119. - ./config/wazuh_dashboard/wazuh.yml:/usr/share/wazuh-dashboard/data/wazuh/config/wazuh.yml
  120. - wazuh-dashboard-config:/usr/share/wazuh-dashboard/data/wazuh/config
  121. - wazuh-dashboard-custom:/usr/share/wazuh-dashboard/plugins/wazuh/public/assets/custom
  122. # --> (Optional) When using traefik
  123. # labels:
  124. # - traefik.enable=true
  125. # - traefik.http.routers.wazuh-prod-1-https.entrypoints=websecure
  126. # - traefik.http.routers.wazuh-prod-1-https.rule=Host(`wazuh-prod-1.srv-prod-1.home.clcreative.de`)
  127. # - traefik.http.routers.wazuh-prod-1-https.tls=true
  128. # - traefik.http.routers.wazuh-prod-1-https.tls.certresolver=cloudflare
  129. # - traefik.http.services.wazuh-prod-1-service.loadbalancer.server.port=5601
  130. # - traefik.http.services.wazuh-prod-1-service.loadbalancer.server.scheme=https
  131. # networks:
  132. # - frontend
  133. # <--
  134. # --> (Optional) When using a separate backend network
  135. # - backend
  136. # <--
  137. depends_on:
  138. - wazuh.indexer
  139. restart: unless-stopped
  140. # --> (Optional) When you need to use an SMTP relay for email notifications, and authentication is required
  141. # postfix:
  142. # image: docker.io/mwader/postfix-relay:1.1.39
  143. # environment:
  144. # - POSTFIX_myhostname=postfix
  145. # volumes:
  146. # - ./config/postfix-relay/main.cf:/etc/postfix/main.cf:ro
  147. # - ./config/postfix-relay/sasl_passwd:/etc/postfix/sasl_passwd:rw # <-- (Optional) Remove when using inline credentials
  148. # - postfix_data:/etc/postfix
  149. # networks:
  150. # - backend
  151. # restart: unless-stopped
  152. # <--
  153. volumes:
  154. wazuh_api_configuration:
  155. wazuh_etc:
  156. wazuh_logs:
  157. wazuh_queue:
  158. wazuh_var_multigroups:
  159. wazuh_integrations:
  160. wazuh_active_response:
  161. wazuh_agentless:
  162. wazuh_wodles:
  163. filebeat_etc:
  164. filebeat_var:
  165. wazuh-indexer-data:
  166. wazuh-dashboard-config:
  167. wazuh-dashboard-custom:
  168. # --> (Optional) When you need to use an SMTP relay for email notifications, and authentication is required
  169. # postfix_data:
  170. # <--
  171. # --> (Optional) When using traefik
  172. # networks:
  173. # frontend:
  174. # external: true
  175. # <--
  176. # --> (Optional) When using a separate backend network
  177. # backend:
  178. # external: true
  179. # <--