-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
88 lines (84 loc) · 2.03 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
version: '3.1'
services:
ecommerce_database:
image: mysql:8.0.19
container_name: ecommerce_mysql
command: --default-authentication-plugin=mysql_native_password
restart: always
volumes:
- ${MYSQL_DIR}:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: ecommerce
MYSQL_USER: root
MYSQL_PASSWORD: root
ports:
- "3316:3306"
networks:
ecommerce_default:
ipv4_address: 10.1.0.101
ecommerce_elasticsearch:
image: elasticsearch:7.6.2
container_name: ecommerce_elasticsearch
environment:
- node.name=ecommerce_cluster_1
- cluster.name=ecommerce_cluster
- cluster.initial_master_nodes=ecommerce_cluster_1
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms256M -Xmx256M"
- http.cors.enabled=true
- http.cors.allow-origin=*
- network.host=_eth0_
ulimits:
nproc: 65535
memlock:
soft: -1
hard: -1
cap_add:
- ALL
deploy:
replicas: 1
update_config:
parallelism: 1
delay: 10s
resources:
limits:
cpus: '1'
memory: 256M
reservations:
cpus: '1'
memory: 1G
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 10s
volumes:
- ${ELASTIC_SEARCH_DIR}:/usr/share/elasticsearch/data
- ${ELASTIC_SEARCH_LOGS_DIR}:/usr/share/elasticsearch/logs
ports:
- "19200:9200"
- "19300:9300"
networks:
ecommerce_default:
ipv4_address: 10.1.0.102
ecommerce_rabbitmq:
container_name: ecommerce_rabbitmq
image: rabbitmq:3-management
hostname: ecommerce_rabbitmq
environment:
RABBITMQ_ERLANG_COOKIE: "test_cluster"
ports:
- "4369:4369"
- "5672:5672"
- "15672:15672"
networks:
ecommerce_default:
ipv4_address: 10.1.0.103
networks:
ecommerce_default:
driver: bridge
ipam:
driver: default
config:
- subnet: 10.1.0.0/24