compose.yaml 6.6 KB

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