-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
143 lines (135 loc) · 3.56 KB
/
docker-compose.yml
File metadata and controls
143 lines (135 loc) · 3.56 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
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
services:
localstack:
container_name: "${LOCALSTACK_DOCKER_NAME:-localstack-main}"
image: localstack/localstack
ports:
- "127.0.0.1:4566:4566" # LocalStack Gateway
- "127.0.0.1:4510-4559:4510-4559" # external services port range
environment:
- DEBUG=${DEBUG:-0}
volumes:
- "${LOCALSTACK_VOLUME_DIR:-./volume}:/var/lib/localstack"
- "/var/run/docker.sock:/var/run/docker.sock"
db:
image: postgres
container_name: 'db'
restart: always
shm_size: 128mb
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
environment:
POSTGRES_PASSWORD: admin
POSTGRES_USER: postgres
ports:
- "5432:5432"
networks:
- "pizzaNetwork"
meal:
container_name: meal-service
image: pizzeria-meal:latest
build:
context: .
dockerfile: meal/Dockerfile
ports:
- "9011:9010"
environment:
- SPRING_PROFILES_ACTIVE=docker
- JAVA_TOOL_OPTIONS=-javaagent:/usr/local/newrelic/newrelic.jar
- NEW_RELIC_APP_NAME=meal-service # Change this to the name you want in New Relic
# volumes:
# - ./newrelic:/usr/local/newrelic
depends_on:
- db
networks:
- "pizzaNetwork"
gateway:
container_name: gateway-service
image: pizzeria-brandenburg:latest
build:
context: .
dockerfile: brandenburg/Dockerfile
ports:
- "8081:8080"
environment:
- JAVA_TOOL_OPTIONS=-javaagent:/usr/local/newrelic/newrelic.jar
- NEW_RELIC_APP_NAME=gateway-service # Change this to the name you want in New Relic
# volumes:
# - ./newrelic:/usr/local/newrelic
depends_on:
- meal
- order
- mail
networks:
- "pizzaNetwork"
order:
container_name: order-service
image: pizzeria-order:latest
build:
context: .
dockerfile: order/Dockerfile
ports:
- "9091:9090"
environment:
- SPRING_PROFILES_ACTIVE=docker
- JAVA_TOOL_OPTIONS=-javaagent:/usr/local/newrelic/newrelic.jar
- NEW_RELIC_APP_NAME=order-service # Change this to the name you want in New Relic
- SPRING_RABBITMQ_HOST=rabbitmq
# volumes:
# - ./newrelic:/usr/local/newrelic
depends_on:
- db
- mail
- meal
networks:
- "pizzaNetwork"
mail:
container_name: mail-service
image: pizzeria-mail:latest
build:
context: .
dockerfile: mail/Dockerfile
ports:
- "8091:8090"
environment:
- SPRING_PROFILES_ACTIVE=secret
- JAVA_TOOL_OPTIONS=-javaagent:/usr/local/newrelic/newrelic.jar
- NEW_RELIC_APP_NAME=mail-service # Change this to the name you want in New Relic
- SPRING_RABBITMQ_HOST=rabbitmq
# volumes:
# - ./newrelic:/usr/local/newrelic
depends_on:
- meal
networks:
- "pizzaNetwork"
rabbitmq:
image: rabbitmq:4.0.7
container_name: 'rabbitmq'
ports:
- "5672:5672"
- "15672:15672"
volumes:
- ~/.docker-conf/rabbitmq/data/:/var/lib/rabbitmq/
- ~/.docker-conf/rabbitmq/log/:/var/log/rabbitmq
environment:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
networks:
- "pizzaNetwork"
agent:
container_name: newrelic-infra
build:
context: .
dockerfile: newrelic-infra.dockerfile
cap_add:
- SYS_PTRACE
pid: host
privileged: true
volumes:
- "/:/host:ro"
- "/var/run/docker.sock:/var/run/docker.sock"
restart: unless-stopped
networks:
- pizzaNetwork
networks:
pizzaNetwork:
driver: "bridge"