-
Notifications
You must be signed in to change notification settings - Fork 63
/
docker-compose.yaml
113 lines (103 loc) · 2.6 KB
/
docker-compose.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
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
#
# Copyright 2021 New Relic Corporation. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
version: '3.8'
services:
# The Database
mysqldb:
platform: linux/amd64
image: mysql:5.6
restart: always
environment:
MYSQL_ROOT_PASSWORD: admin
MYSQL_DATABASE: database
MYSQL_USER: admin
MYSQL_PASSWORD: admin
MYSQL_HOST: mysqldb
ports:
- "3306:3306"
healthcheck:
test: ["CMD", "mysql", "--user=admin", "--password=admin", "-e", "SELECT 1"]
interval: 10s
timeout: 10s
retries: 3
start_period: 20s
container_name: mysqldb
volumes:
- var-run-mysqld:/var/run/mysqld
redisdb:
image: redis
restart: always
ports:
- "6379:6379"
container_name: redisdb
memcached:
image: memcached:latest
restart: always
ports:
- "11211:11211"
container_name: memcached
postgres:
image: postgres
restart: always
environment:
POSTGRES_PASSWORD: root
POSTGRES_USER: postgres
ports:
- "5432:5432"
container_name: postgres
php:
platform: ${PLATFORM:-}
image: newrelic/nr-php-agent-builder:make-php-${PHP:-8.2}-${LIBC:-gnu}-${IMAGE_VERSION:-v1}
environment:
MEMCACHE_HOST: memcached
MYSQL_DB: database
MYSQL_USER: admin
MYSQL_PASSWD: admin
MYSQL_HOST: mysqldb
MYSQL_SOCKET: /var/run/mysqld/mysqld.sock
PG_HOST: postgres
PG_PORT: 5432
PG_USER: postgres
PG_PW: root
PREDIS_HOME: /usr/src/vendor/predis/predis/
REDIS_HOST: redisdb
volumes:
- ${AGENT_CODE:-$PWD}:/usr/local/src/newrelic-php-agent
- var-run-mysqld:/var/run/mysqld
entrypoint: tail
command: -f /dev/null
container_name: nr-php
profiles: ["test"]
devenv:
build:
context: .
dockerfile: files/Dockerfile
user: ${UID}:${GID}
environment:
MEMCACHE_HOST: memcached
MYSQL_DB: database
MYSQL_USER: admin
MYSQL_PASSWD: admin
MYSQL_HOST: mysqldb
MYSQL_SOCKET: /var/run/mysqld/mysqld.sock
PG_HOST: postgres
PG_PORT: 5432
PG_USER: postgres
PG_PW: root
PREDIS_HOME: /usr/src/vendor/predis/predis/
REDIS_HOST: redisdb
PS1: "New Relic > "
NEWRELIC_COLLECTOR_HOST : ${NEW_RELIC_COLLECTOR_HOST:-collector.newrelic.com}
NEWRELIC_LICENSE_KEY: ${NEW_RELIC_LICENSE_KEY}
volumes:
- ${PWD}:/usr/src/myapp
- var-run-mysqld:/var/run/mysqld
working_dir: /usr/src/myapp
stdin_open: true
tty: true
container_name: agent-devenv
profiles: ["dev"]
volumes:
var-run-mysqld: