-
Notifications
You must be signed in to change notification settings - Fork 598
/
docker-compose.yml
119 lines (119 loc) · 2.63 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
services:
elasticsearch7:
image: elasticsearch:7.16.2
ports:
- "9200:9200"
environment:
- discovery.type=single-node
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
mem_limit: 1g
elasticsearch8:
image: elasticsearch:8.13.0
ports:
- "9250:9250"
environment:
- discovery.type=single-node
- xpack.security.enabled=false
- http.port=9250
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
mem_limit: 1g
# this docker-compose service doesn't always work with "docker compose run opensearch"
# the tests consistently work with:
# docker run -it -p 9200:9200 -p 9600:9600 -e "discovery.type=single-node" --name opensearch-node opensearchproject/opensearch:1.3.18
# opensearch:
# image: opensearchproject/opensearch:1.3.18
# environment:
# - discovery.type=single-node
# ports:
# - 9200:9200
# - 9600:9600
# mem_limit: 1g
mysql:
image: mysql:5.7
platform: linux/x86_64
restart: always
environment:
MYSQL_ROOT_PASSWORD: mysql_root_password
MYSQL_DATABASE: app
expose:
- "3306"
volumes:
- mysql:/var/lib/mysql
rabbitmq:
image: rabbitmq:3.9.12
restart: always
environment:
RABBITMQ_NODENAME: rabbit
expose:
- "5672"
- "15672"
- "25672"
- "4369"
memcached:
image: memcached:1.6.12
restart: always
expose:
- "11211"
mongodb:
image: mongo:5.0.4
restart: always
volumes:
- /data/db
expose:
- "27017"
postgres:
image: postgres:14.2
restart: always
environment:
POSTGRES_USER: admin
POSTGRES_PASSWORD: postgres_password
volumes:
- postgres:/var/lib/postgresql/data
expose:
- "5432"
redis:
image: redis:6.2.6
restart: always
volumes:
- /var/lib/redis
expose:
- "6379"
app:
build:
context: .
args:
- ruby_version=${RUBY_VERSION:-3.1}
image: newrelic_rpm
tty: true
stdin_open: true
environment:
MYSQL_USERNAME: root
MYSQL_PASSWORD: mysql_root_password
DATABASE_NAME: app
MYSQL_HOST: mysql
POSTGRES_USERNAME: admin
POSTGRES_PASSWORD: postgres_password
command: ["irb"]
volumes:
- ".:/usr/src/app"
depends_on:
- elasticsearch7
- elasticsearch8
# - opensearch
- mysql
- memcached
- mongodb
- postgres
- rabbitmq
- redis
sysctls:
- "net.ipv6.conf.all.disable_ipv6=0"
volumes:
mongodb:
driver: local
mysql:
driver: local
postgres:
driver: local