-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathdocker-compose-databases.yml
More file actions
73 lines (72 loc) · 1.75 KB
/
docker-compose-databases.yml
File metadata and controls
73 lines (72 loc) · 1.75 KB
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
services:
postgres:
image: postgres:16
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 2s
timeout: 5s
retries: 15
ports:
- '5432:5432'
expose:
- '5432'
environment:
- POSTGRES_USER=user
- POSTGRES_PASSWORD=password
- PGPASSWORD=password
volumes:
- db:/var/lib/postgresql/data
networks:
- databases
redis:
image: 'redis/redis-stack:latest'
ports:
- '6379:6379' # Expose Redis on the default port
- '8001:8001' # Expose Redis Stack Server UI/tools
environment:
- ALLOW_EMPTY_PASSWORD=yes
volumes:
- cache:/data
networks:
- databases
search:
image: opensearchproject/opensearch:latest
environment:
cluster.name: search
discovery.type: single-node
node.name: search
plugins.security.disabled: true
bootstrap.memory_lock: true
OPENSEARCH_JAVA_OPTS: "-Xms512m -Xmx512m" # Set min and max JVM heap sizes to at least 50% of system RAM
OPENSEARCH_INITIAL_ADMIN_PASSWORD: "yourStrongPassword123!"
healthcheck:
interval: 10s
retries: 80
test: curl --write-out 'HTTP %{http_code}' --fail --silent --output /dev/null http://localhost:9200/
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
ports:
- 9200:9200 # REST API
- 9600:9600 # Performance Analyzer
networks:
- databases
volumes:
- opensearch_data:/usr/share/opensearch/data
networks:
databases:
external: true
volumes:
db:
name: macro_postgres_data
driver: local
cache:
name: macro_redis_data
driver: local
opensearch_data:
name: macro_opensearch_data
driver: local