-
Notifications
You must be signed in to change notification settings - Fork 18
/
docker-compose-test.yaml
78 lines (75 loc) · 2.58 KB
/
docker-compose-test.yaml
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
version: '3'
services:
test-dc-opensearch: # This is also the hostname of the container within the Docker network (i.e. https://test-dc-opensearch/)
image: opensearchproject/opensearch:latest # Specifying the latest available image - modify if you want a specific version
container_name: test-dc-opensearch
environment:
- cluster.name=opensearch-cluster # Name the cluster
- node.name=test-dc-opensearch # Name the node that will run in this container
- discovery.seed_hosts=test-dc-opensearch # Nodes to look for when discovering the cluster
- cluster.initial_cluster_manager_nodes=test-dc-opensearch # Nodes eligible to serve as cluster manager
- bootstrap.memory_lock=true # Disable JVM heap memory swapping
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" # Set min and max JVM heap sizes to at least 50% of system RAM
ulimits:
memlock:
soft: -1 # Set memlock to unlimited (no soft or hard limit)
hard: -1
nofile:
soft: 65536 # Maximum number of open files for the opensearch user - set to at least 65536
hard: 65536
volumes:
- test-opensearch-data:/usr/share/opensearch/data # Creates volume called opensearch-data and mounts it to the container
ports:
- 9222:9200 # REST API
- 9666:9600 # Performance Analyzer
networks:
- test-opensearch-net # All of the containers will join the same Docker bridge network
test-dc-postgres:
container_name: test-postgres_container
image: postgres
environment:
POSTGRES_DB: dc_db
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
PGDATA: /data/postgres
volumes:
- test-postgres:/data/postgres
ports:
- "5434:5432"
networks:
- test-postgres
restart: unless-stopped
test-dc-elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.10.1
container_name: test-dc-elasticsearch
environment:
- discovery.type=single-node
- xpack.security.enabled=false
volumes:
- test-elasticsearch-data:/usr/share/elasticsearch/data
ports:
- "9210:9200"
- "9310:9300"
test-dc-mysql:
container_name: test-dc-mysql
image: mysql:8.0
environment:
MYSQL_DATABASE: dcs_db
MYSQL_USER: dbuser
MYSQL_PASSWORD: dbpass
MYSQL_ROOT_PASSWORD: root
volumes:
- test-dc-mysql:/var/lib/mysql
ports:
- "3304:3306"
restart: unless-stopped
networks:
test-opensearch-net:
test-postgres:
driver: bridge
volumes:
test-elasticsearch-data:
test-opensearch-data:
test-dc-mysql:
test-postgres:
driver: local