forked from newrelic/node-newrelic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·154 lines (144 loc) · 4.07 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
services:
elasticsearch:
container_name: nr_node_elastic
image: docker.elastic.co/elasticsearch/elasticsearch:8.8.0
environment:
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
# Set cluster to single node
- "discovery.type=single-node"
# Disable high watermarks, used in CI as the runner is constrained on disk space
- "cluster.routing.allocation.disk.threshold_enabled=false"
- "network.host=_site_"
- "transport.host=127.0.0.1"
- "http.host=0.0.0.0"
# Disable password
- "xpack.security.enabled=false"
ports:
- "9200:9200"
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1:9200"]
interval: 30s
timeout: 10s
retries: 5
# Kafka setup based on the e2e tests in node-rdkafka. Needs both the
# `zookeeper` and `kafka` services.
zookeeper:
container_name: nr_node_kafka_zookeeper
image: confluentinc/cp-zookeeper
ports:
- '2181:2181'
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
kafka:
container_name: nr_node_kafka
image: confluentinc/cp-kafka
links:
- zookeeper
ports:
- '9092:9092'
healthcheck:
test: /usr/bin/kafka-cluster cluster-id --bootstrap-server localhost:9092 || exit 1
interval: 1s
timeout: 60s
retries: 60
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT://localhost:9092'
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_DEFAULT_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
memcached:
container_name: nr_node_memcached
image: memcached
ports:
- "11211:11211"
mongodb_5:
container_name: nr_node_mongodb_5
image: library/mongo:5
ports:
- "27017:27017"
healthcheck:
test: ["CMD", "mongo", "--quiet"]
interval: 1s
timeout: 10s
retries: 30
mysql:
container_name: nr_node_mysql
platform: ${DOCKER_PLATFORM:-linux/amd64}
# We cannot use an image later than 8.3 because they have fully removed
# the configuration option we need in order to switch back to the native
# authentication method. We must use the native authentication method
# because the `mysql` package does not support the `caching_sha2_password`
# authentication method.
image: mysql:8.3
volumes:
- "./docker/mysql:/etc/mysql/conf.d"
ports:
- "3306:3306"
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: 1
healthcheck:
test: ["CMD", "mysql" ,"-h", "mysql", "-P", "3306", "-u", "root", "-e", "SELECT 1"]
interval: 1s
timeout: 10s
retries: 30
redis:
container_name: nr_node_redis
image: bitnami/redis
ports:
- "6379:6379"
- "6380:6380"
environment:
- ALLOW_EMPTY_PASSWORD=yes
- REDIS_TLS_ENABLED=yes
- REDIS_TLS_PORT=6380
- REDIS_TLS_CERT_FILE=/tls/redis.crt
- REDIS_TLS_KEY_FILE=/tls/redis.key
- REDIS_TLS_CA_FILE=/tls/ca.crt
- REDIS_TLS_AUTH_CLIENTS=no
volumes:
- "./docker/redis:/tls"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 1s
timeout: 10s
retries: 30
cassandra:
container_name: nr_node_cassandra
platform: ${DOCKER_PLATFORM:-linux/amd64}
image: cassandra
ports:
- "9042:9042"
healthcheck:
test: [ "CMD", "cqlsh", "-u cassandra", "-p cassandra"]
interval: 5s
timeout: 10s
retries: 20
# pg 9.2 has built in healthcheck
pg:
container_name: nr_node_postgres
image: postgres:9.2
ports:
- "5432:5432"
pg_prisma:
container_name: nr_node_postgres_prisma
image: postgres:15
ports:
- "5434:5434"
environment:
PGPORT: 5434
POSTGRES_PASSWORD: postgres
healthcheck:
test: ["CMD", "pg_isready"]
interval: 1s
timeout: 10s
retries: 30
rmq:
container_name: nr_node_rabbit
image: rabbitmq:3
ports:
- "5672:5672"