-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
129 lines (125 loc) · 3.8 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
services:
elasticsearch:
image: "elasticsearch:${elasticsearch_image_version}"
container_name: elasticsearch
hostname: elasticsearch
restart: unless-stopped
user: ${UID}:0
environment:
- http.host=0.0.0.0
- discovery.type=single-node
- cluster.name=hive
- thread_pool.search.queue_size=100000
- thread_pool.write.queue_size=100000
- bootstrap.memory_lock=true
- xpack.security.enabled=true
- ELASTIC_PASSWORD=${elasticsearch_password} # Password for "elastic" default user
- ES_JAVA_OPTS=-Xms6G -Xmx6G
volumes:
- ./elasticsearch/data:/usr/share/elasticsearch/data
- ./elasticsearch/logs:/usr/share/elasticsearch/logs
ulimits:
nofile:
soft: 65536
hard: 65536
deploy:
resources:
limits:
memory: 7G
cpus: '4.000'
memswap_limit: 7G
networks:
- cortex-network
healthcheck:
test: ["CMD-SHELL", "curl -f -s -u 'elastic:${elasticsearch_password}' http://elasticsearch:9200/_cat/health || exit 1"]
start_period: 40s
interval: 2s
timeout: 1s
retries: 5
labels:
com.strangebee.stack: "cortex-stack"
com.strangebee.service: "elasticsearch"
com.strangebee.role: "indexing"
com.strangebee.environment: "testing"
com.strangebee.version: "${elasticsearch_image_version}"
com.strangebee.dependency: "None"
cortex:
image: "thehiveproject/cortex:${cortex_image_version}"
container_name: cortex
hostname: cortex
restart: unless-stopped
environment:
- |
JAVA_OPTS=
-Xms4000M
-Xmx4000M
-XX:MaxMetaspaceSize=400m
-XX:ReservedCodeCacheSize=250m
- es_uri=http://elasticsearch:9200
- job_directory=/tmp/cortex-jobs
- docker_job_directory=${cortex_docker_job_directory}
volumes:
# Mounting docker socket in the container so that cortex can run jobs as containers
- /var/run/docker.sock:/var/run/docker.sock
# Storing jobs under /tmp for now
- ./cortex/cortex-jobs:/tmp/cortex-jobs
- ./cortex/config:/etc/cortex:ro
- ./cortex/logs:/var/log/cortex
- ./cortex/neurons:/opt/cortexneurons
deploy:
resources:
limits:
memory: 5G
cpus: '4.000'
memswap_limit: 5G
networks:
- cortex-network
# ports:
# - '0.0.0.0:9001:9001'
healthcheck:
test: ["CMD-SHELL", "curl -s -f cortex:9001/cortex/api/status || exit 1"]
start_period: 40s
interval: 10s
timeout: 1s
retries: 5
depends_on:
elasticsearch:
condition: service_healthy
labels:
com.strangebee.stack: "cortex-stack"
com.strangebee.service: "cortex"
com.strangebee.role: "application"
com.strangebee.environment: "testing"
com.strangebee.version: "${cortex_image_version}"
com.strangebee.dependency: "elasticsearch"
nginx:
image: "nginx:${nginx_image_version}"
container_name: nginx
hostname: nginx
restart: unless-stopped
environment:
SERVER_NAME: "${nginx_server_name}"
NGINX_SSL_TRUSTED_CERTIFICATE: "${nginx_ssl_trusted_certificate}"
volumes:
- ./nginx/templates:/etc/nginx/templates # Custom Nginx configuration
- ./nginx/certs:/etc/nginx/certs # Directory for custom certificates
ports:
- '443:443'
networks:
- cortex-network
deploy:
resources:
limits:
memory: 512M
cpus: '1.000'
depends_on:
- cortex
labels:
com.strangebee.stack: "cortex-stack"
com.strangebee.service: "nginx"
com.strangebee.role: "reverse proxy"
com.strangebee.environment: "testing"
com.strangebee.version: "${nginx_image_version}"
com.strangebee.dependency: "cortex"
networks:
cortex-network: