/
docker-compose.prod.yml
70 lines (63 loc) · 1.67 KB
/
docker-compose.prod.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
version: "3"
services:
elaster:
image: ${DOCKER_REPO}:${DOCKER_IMAGE_PROD_TAG:-latest}
ports:
- "9090:9090"
environment:
ENV: PROD
# env_file: docker-production.env
labels:
io.aroyd.service.container.name: "elaster"
io.aroyd.servcie.container.env: "production"
deploy:
mode: replicated
replicas: 4
placement:
constraints:
- node.role == worker
update_config:
parallelism: 2
delay: 30s
failure_action: pause
monitor: 20s
restart_policy:
condition: on-failure
delay: 10s
max_attempts: 5
window: 120s
labels:
io.aroyd.service.task.name: "elaster"
io.aroyd.service.task.env: "production"
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:5.3.0
labels:
io.aroyd.service.container.name: "elasticsearch"
io.aroyd.servcie.container.env: "production"
environment:
cluster.name: "elasticsearch-cluster-elaster"
bootstrap.memory_lock: true
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
deploy:
placement:
constraints:
- engine.labels.io.aroyd.machine.aws.az == b
update_config:
parallelism: 1
delay: 10s
failure_action: pause
monitor: 10s
restart_policy:
condition: on-failure
delay: 10s
max_attempts: 5
window: 120s
volumes:
- elasticsearch_data_volume:${ELASTICSEARCH_DATA_DIR:-/usr/share/elasticsearch/data}
volumes:
elasticsearch_data_volume:
driver: rexray
driver_opts:
volumeType: "gp2"
size: "4"
availabilityZone: "ap-south-1b"